Product Documentation

FairCom RTG COBOL User Guide

Previous Topic

Next Topic

ctaddrtgi - Add SQL indexes over existing COBOL tables

FairCom RTG V2 introduced support for adding SQL indexes over existing COBOL tables, as discussed here: SQL Indexes on COBOL Files

For existing tables created prior to FairCom RTG V2 (for tables created with FairCom DB versions prior to V11), an internal RTGI resource must be added to the table. This RTGI resource is automatically added with FairCom RTG V2 and newer (with FairCom DB V11 and newer).

The ctutil utility can be renamed to ctaddrtgi and used to add new FairCom RTG indexes. When renamed, it functions as an ad-hoc utility that can be run over old data files to give them the necessary information to add indexes through FairCom RTG.

The utility requires one parameter, which is the file name (without the file extension).

Note: It is safe to run this utility on a file that already has an RTGI resource (e.g., it is safe to run this utility on a file that does not need it). In this case the utility will simply return success and do nothing.

Once the ctaddrtgi utility has been executed over a data file, the process discussed here can be followed to add new SQL indexes: SQL Indexes on COBOL Files

Usage:

ctaddrtgi filename

where:

  • filename - The file name without extension.

TOCIndex