Creating XFD Files

To create an XFD file, specify the -Fx or -Fa option at compile time. For example:
ccbll32 -fa animals.cbl

Use the -Fa or -Fx option to generate XFDs for all indexed, relative, and sequential files in XML format. Specify -Fae or -Fxe to generate the XFDs in standard flat text file format. XFDs are stored in your source code directory unless you use -Fo to specify another location.

Once you compile with the -Fx option, each COBOL file has a corresponding .xfd file. The directive creates .xfd files without changing anything in the object code.

Creating XFD files at compile time offers two significant advantages:

The XFDs contain information about such things as the structure of the COBOL files, the names of the fields, and their format. However, this information is only a subset of the information available in most applications. To map your COBOL fields to tables that are more meaningful and useful to the application, you may need to add additional information to your XFDs. To add information to your XFDs, or to change the default names of the existing fields, you must use directives, or optional comments, in the FD section of your COBOL program. These directives are explained in Using XFD Directives.

Note: If you create your XFDs with a data storage option, you must specify the -s switch to xdbcutil when loading your system catalog with your XFDs. See xdbcutil Syntax for more information.