In this topic, you create a Visual Studio solution for your COBOL application. You then use the compiler to compile the COBOL application to generate an “eXtended File Descriptor” (XFD). The XFD is used to map your data from the record-oriented COBOL application to a relational database’s column-oriented format.
The new project generates a template program called program1.cbl that is not needed. You may want to delete it.
Notice that to instruct the compiler to generate the XFD file, you use at the beginning of the COBOL program the following directive:
$SET CREATEXFD
If you want the XFD files to be placed in a different directory from the current one, you can use the following format:
$SET CREATEXFD(XFD-DIRECTORY=c:\myproject\xfd)
This directive can also be set using the project’s properties. To do this, double-click on the project’s Properties, click on the COBOL tab, and in the Additional Directives entry field type CREATEXFD. Save the changes.
The compiler creates the purch1.xfd file in your current XFD directory.