Relational databases work with data in a column-oriented format, while COBOL works with data in a record-oriented format. To move your data between these two domains, you need some form of mapping. To accomplish this, compile the COBOL application to generate an eXtended File Descriptor (XFD). This XFD maps data from the record-oriented COBOL application to a relational database’s column-oriented format. For detailed information on XFDs, see the chapter XFDs.
To instruct the compiler to generate XFD files:
$SET CREATEXFD IDENTIFICATION DIVISION. PROGRAM-ID. DBACCT.
If you want the XFD files to be placed in a different directory from the current one, use the following format:
$SET CREATEXFD(XFD-DIRECTORY=c:\myproject\xfd)
The next section expands the COBOL application to create a database table in Microsoft SQL Server using the XFD file generated by the compiler.