Using XFD Directives

XFDs may be built directly from your source code with only the CREATEXFD directive if the compiler's default mapping rules are sufficient for your situation. If you would like to override the default mapping behavior or map a field to a different name, you can add additional directives to your COBOL code.

Directives are optional comments that you can place into an FD in your COBOL source code to control how XFDs are built. By controlling how XFDs are built, you can guide the way Micro Focus XDBC will map the content of your COBOL files' fields to columns in the tables that comprise your database.

Among other things, directives enable you to

Directives are always placed within a COBOL FD. They do not affect Procedure Division I/O statements, and they do not change your COBOL data in any way. The only exception to this is the CREATEXFD directive.

Note: If you are going to access your COBOL data from an ODBC- or JDBC-enabled application, each field in the application must correspond to a data item in your COBOL FD or XFD. To ensure that this is the case, you may need to use the NAME directive to add fields to the XFD.