Product Documentation

FairCom RTG COBOL User Guide

Previous Topic

Next Topic

-upgrade

Note: If you are upgrading to FairCom RTG V2 from prior releases, you will need to run the ctutil -upgrade command.

ctutil ‑upgrade

This option upgrades the file to the current configured format. It basically copies the file using the definitions in the configuration file. With this switch it is possible to take an existing data file and upgrade it to the latest format.

Usage:

ctutil -upgrade source_file [dest_file] [-ctattr]

  • source_file - Source file name without extension.
  • dest_file - Destination file name without extension.

This capability gives the customer a tool to upgrade an existing file to match the current settings in ctree.conf and/or the current FairCom RTG file format. This switch makes it possible to upgrade an existing data file to the latest format. For example, it would be used if a revision changed the file's physical layout (e.g., altering the header). FairCom RTG logic attempts to handle files in older formats, however it may be necessary to upgrade files after installing a new revision to take advantage of new features or to correct bad behavior.

If no destination file is included, the file will be upgraded in place to include the ctFlexRec attribute.

Upgrade specific attributes

  • -ctattr - This option was introduced in RTG V5, and allows a table to participate in hot alter table operations and other features requiring complete schema information. This attribute forces an existing RTGI resource to be upgraded to the latest RTGI v2, which is required for this advanced support. When the -ctattr option is specified, the file is not re-created to match the current configuration. Instead, only its RTG resource is converted to the <ctattr> format. This is faster than re-creating the file, especially if the file has large amount of data records. Existing RTG tables from prior versions remain compatible with current RTG versions. However, they will lack certain capabilities until their internal resources (such as RTGI) are updated.

TOCIndex