XFD Directive Syntax

Place each XFD directive syntax on a line by itself, immediately before the COBOL line to which it pertains.

Introduce each XFD directive with a $ in the Indicator Area (column 7 in standard ANSI source format), followed immediately by the letters XFD, and then the XFD directive itself. There should be no space between the $ and the XFD. Spaces are permitted elsewhere on the line as separators. For example, the NAME XFD directive looks like this:

$XFD  NAME = EMP-NUMBER

An alternate ANSI-compliant way to introduce a directive is with an asterisk (*) in the Indicator Area. In this case, you begin the directive with the letters XFD and enclose the entire comment in double parentheses. For example:

*(( XFD  NAME = EMP-NUMBER ))

There should be no space between the asterisk and the double left parentheses. Spaces are permitted elsewhere on the line as separators. You may use either form of the directive syntax (or both) in your applications.

Note that XFD directives are case-insensitive and that hyphens and underscores are considered equivalent. Thus, for example,

$XFD VAR_LENGTH
$XFD VAR-LENGTH
$xfd var_length
$xfd var-length

are all recognized as equivalent.

Two or more XFD directives that pertain to the same line of COBOL code may be combined on one comment line. The XFD directives should be separated by a space or a comma. For example, to specify both USE GROUP and NUMERIC at the same time, you would add this line:

$XFD  USE GROUP, NUMERIC