Product Documentation

c-treeRTG COBOL Edition User's Guide

Previous Topic

Next Topic

Converting COBOL Vision Data to c-treeRTG COBOL Edition

This walkthrough describes how to convert existing COBOL data created with the ACUCOBOL Vision file system to c-treeRTG COBOL Edition 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:

  1. To create an empty file using c-treeRTG COBOL Edition, execute ctutil -make passing the new file name and the XFD 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 vutil32 -unload functionality:

    vutil32 -unload mydata mydata.dmp

    This command will dump the entire contents of the mydata file to a plain text file called mydata.dmp

  3. Load the dumped data into the file created in step 1 using the ctutil -load functionality:

    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 c-treeRTG COBOL Edition data file.

  4. Now the new c-treeRTG COBOL Edition data file mydata can be read through the c-treeRTG COBOL Edition 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 c-treeRTG COBOL Edition engine to import the data file as part of a SQL database.

TOCIndex