xddgen is used to generate XDD files directly from COBOL source code. Because xddgen must analyze the program to create the XDD, it needs a full COBOL program as input.
Usage
xddgen [options] file...
Options:
acu ACUCOBOL-GT
acu-Ds ACUCOBOL-GT using the -Ds switch
cobol2002 COBOL 2002
cobol85 COBOL 85
ibm IBM Compatible
mvs MVS Compatible
bs2000 BS2000 Compatible
mf Micro Focus Compatible
default When not specified
Some elements of COBOL FD statements require special consideration when generating the XDD. In particular:
Redefines
Fields contained in a redefining item occupy the same positions as the fields being redefined.
The XDD generator needs to select just one of the field definitions; by default it takes the fields in the item being redefined.
Multiple record definition
The same rule applies to multiple record definitions which are redefinitions of the entire record area, so again this leads to multiple definitions for the same data area. In this case the XDD generator picks the first definition.
Group items
By default never included in an XDD as they result in multiple names for the same data items.
FILLER Data Items
In a COBOL FD, FILLER data items are placeholders however they take space on the record area. FILLER items are not uniquely named, so when generating the XDD they get renamed to have a unique name and by default are marked as “hidden fields”.
Occurs
An OCCURS clause requires special handling because there must be a unique name to each database column. The XDD generator accomplishes this by expanding the OCCURS items and appending sequential index numbers to the items named in the OCCURS.
Primary Key
The xddgen utility (as well as ctutil -xfd2xdd) mark the first index as the primary in the XDD definition so that this key becomes the primary key for SQL.