ctmigra is a general purpose data migration utility for converting non-c-tree data for use with FairCom RTG. It can be used with multiple external data types, including COBOL data files. (For certain data types, such as Btrieve, this also requires access to your original external libraries used to access incoming source files in their native format, and ctmigra has ability to link with these libraries as required.)
The ctmigra utility migrates data by reading records from existing external tables and writing them to FairCom RTG files. Supported interfaces include ExtFH (for access to Micro Focus COBOL files) and BTRV (for access to Btrieve files). It also supports other file handlers.
ctmigra is located in the tools\cmdline directory of your FairCom RTG installation. A graphical interface version RTG Migrate is also available providing similar functionality in an easy to view window. You'll find this in your tools/guitools.java of your FairCom RTG installation.
Example
Note: This example is appropriate for Btrieve tables and C-ISAM COBOL tables.
To copy and covert data from Micro Focus COBOL tables into FairCom RTG, use ctmigra as follows:
ctmigra extfh -s C:\MICROFOCUS\lib\MFFH.DLL!MFFH S:\Data.MF\MYFILE D:\Data.RTG\MYFILE.dat
To use ctmigra with Unix-based Micro Focus libraries, be sure to pre-load them with the LD_PRELOAD environment variable or an alternative mechanism.
For example, on an AIX 64-bit platform (this is all on a single command line):
LDR_PRELOAD64=libcobrts64.3.so:libcobcrtn64.3.so:libcobmisc64.3.so ctmigra extfh -s libcobrts64.3.so!EXTFH /data/mf/myfile /data/rtg/myfile.dat
For example, on a Linux 32-bit platform (this is all on a single command line):
LD_PRELOAD=libcobrts.so:libcobcrtn.so:libcobmisc.so ctmigra extfh -s libcobrts.so!EXTFH /data/mf/myfile /data/rtg/myfile.dat
See Also