Product Documentation

c-treeRTG COBOL Edition User's Guide

Previous Topic

Next Topic

xddgen - New Configuration Option max-fixed-record-len

When RM/COBOL is configured to use Btrieve as the file handler, the creation of a fixed-length file with record size over 4082 actually creates a variable-length file with a minimum record length of 4082 and maximum record length of whatever is the record size. This can cause a problem when an XDD is generated and the file is SQLized or the XDD is used to re-create the file.

Because RM/COBOL does not have a way of generating a "schema" that can be translated into an XDD, xddgen is the only way to produce an XDD.

Given the FD and the SL with a record size greater than 4082, xddgen produces a XDD containing minRecLen equal to maxRecLen. When this XDD is used to sqlize the file created by RM/COBOL, the SQL callback fails because the definition is not correct (the file is variable with a fixed-length of 4082). When used to generate a file (ctutil -make), the RM/COBOL runtime fails with error 39.09 because the definition does not match.

xddgen has no way to know about this limit on the minRecLen unless instructed so. Therefore, a new configuration parameter has been added:

max-fixed-record-len

The default is 0, meaning no limit. When set to a value other than 0, it is used to limit the minRecLen value when generating the XDD.

To use this keyword, create your own xddgen configuration file with content similar to:

include "default.conf"

max-fixed-record-len: 4082

TOCIndex