Perl Script to Convert a Progress Table Dump file to a CIM Load File

Written by James McDonald

September 14, 2012

Ran into a problem trying to load a .d file with the progress editor.  I think there was a unique index on the first first field of the msg_mstr table so I had to update the records using CIM from inside QAD.

This is the script I used to convert it from .d format to .cim.

#!/usr/bin/perl -w

open ( FH, "<msg_mstr.d") or die "Can't open File";

open ( OUT, ">msg_mstr.cim") or die "Can't open output";

while(<FH>) {

	# given this line in the msg_mstr.d file
	# 1576 "Lotus Notes does not fully support this option" \
        # "us" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
	# this regular expression will select the 1st three
        # values and store them in $1, $2 and $3
	$_ =~ m/(\d+)\s(\".*\")\s(\"\w{2}\")/;

	print OUT '@@batchload mgmsgmt.p' . "\n";

	print OUT "$3\n$1\n$2\n";

	print OUT '@@end' . "\n";




The above created the following CIM format.

@@batchload mgmsgmt.p 
"Lotus Notes does not fully support this option" 


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Meraki Open Source Licenses

Until today I assumed that Meraki was built in-house with only closed source software. But having a look at the...


If you have Veeam backup failing with the Updating BCD failed with Cannot update SafeBoot flag and SentinelOne is...