Previous Topic Next topic Print topic


DIRECTIVES, DIR

Makes the Compiler read directives from a file.

Syntax:

>>-.---.-.-DIRECTIVES-.-.-"filename"-.-------><
   +-/-+ +-DIR--------+ +-"$env-var"-+

Parameters:

filename A full file specification of the directives file. This can be any valid filename except cobol.dir .
$env-var An environment variable that is set to the full file specification of the directives file.

Properties:

Default: None
Phase: Syntax check
$SET: Any

Comments:

A directives file is a text file containing directives. Directives are separated by a space or the end of line. A directive cannot be broken across two lines.

You can include a comment in the file by placing an ampersand (in column 1 of the comment line, followed by a space. If you omit the space the comment is treated as a directive, and the syntax check on that file fails.

The directives are read from the file until the end of file is reached or another DIRECTIVES directive is encountered. The maximum length of a line is 128 characters.

You can specify more than one directives file in a program by specifying DIRECTIVES"filename" several times. If you specify the DIRECTIVES directive in a directives file, the Compiler switches to the new directives file, reads all the directives in it, returns to the original directives file, and continues to read the directives specified after the DIRECTIVES directive. You can nest directives files to any depth.

The directives file is searched for in the current and COBOL system directories. If no extension is specified, a file extension of .dir is added before the search is made. If no file is found, the search is repeated with no extension.

Previous Topic Next topic Print topic