Product Documentation

FairCom RTG V3 Update Guide

Previous Topic

Next Topic

Faster OPEN OUTPUT File Reuse

COBOL applications commonly delete all existing records in a file with a single OPEN OUTPUT operation that deletes and recreates an existing file. A new FairCom RTG optimization checks if the file being created already exists with the same file name and file definitions, and, if so, truncates existing data from the file rather than deleting and recreating a new file This saves several OS file operations improving responsiveness of the call.

To take advantage of this optimization, add <truncateifexist> to your local FairCom RTG ctree.conf configuration. This option is off by default.

If <log><debug><file> is also enabled, file truncation operations are logged with the message:

DEBUG FILE truncated: filename

TOCIndex