Product Documentation

FairCom RTG COBOL User Guide

Previous Topic

Next Topic

Converting AcuCOBOL Vision Format Data to FairCom RTG COBOL

This walkthrough describes how to convert existing COBOL data created with the RM/COBOL file formats to FairCom RTG COBOL data.

If you cannot create files with your COBOL application, ctutil can use your XFD (or XDD) files to create a new empty file having the same structure described by the XFD (or XDD) files.

The following steps are used to convert RM/COBOL files into RTG files. If you have already created the RTG files you can jump directly to step 2:

  1. To create an empty file using FairCom RTG COBOL, execute ctutil -make passing the new file name and the XFD or XDD file containing its definition:

    ctutil -make myctdata mydata.xfd

    This command will create a file named myctdata using the image string obtained from the mydata.xfd.

  2. Dump the existing data from the existing mydata data file created using Vision by using the RM/COBOL recover2 utility. This is a menu driven utility. Be sure to select the NOSUB option for most cases. This utility unloads data into a sequential line format.
  3. Load the dumped data into the file created in step 1 using the ctutil -load functionality:

    ctutil -load -r2 myctdata mydata.dmp A

    This command loads the data from the line sequential file called mydata.dmp and writes it to the mydata FairCom RTG COBOL data file. The -r2 is required and specific to RM/COBOL line sequential format.

  4. Now the new FairCom RTG COBOL data file mydata can be read through the FairCom RTG COBOL SQL engine by running the following command:

    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.

TOCIndex