This walkthrough describes how to convert existing COBOL data created with the ACUCOBOL Vision file system to FairCom RTG COBOL data.
If your COBOL program performs OPEN OUTPUT operations, set the file system to CTREE (see Runtime Configuration) before running your program to create files in c-tree format.
If you cannot create files with your COBOL application, ctutil can use your XFD files to create a new empty file having the same structure described by the XFD files.
The following steps are used to convert ACUCOBOL Vision files into c-tree files. If you have already created the c-tree files you can jump directly to step 2:
ctutil -make myctdata mydata.xfd
This command will create a file named myctdata using the image string obtained from the mydata.xfd.
vutil32 -unload mydata mydata.dmp
This command will dump the entire contents of the mydata file to a plain text file called mydata.dmp
ctutil -load myctdata mydata.dmp A
This command loads the data from the plain text file called mydata.dmp and writes it to the mydata FairCom RTG COBOL data file.
ctutil -sqlize myctdata mydata.xfd ADMIN ctreeSQL
This command parses the mydata.xfd file and generates an XDD schema definition on the fly to be used by the FairCom RTG COBOL engine to import the data file as part of a SQL database.
Direct Conversion
There is example code in drivers/ctree.cobol/samples/acucobol/visionconvert for a direct conversion utility. This can be compiled under any AcuCOBOL environment. It will extra data from a native Vision format table and write into an RTG table.