Problem:
Which directives take precedence over which ones?
Resolution:
The Compiler processes the directives in the following order, and if a directive is specified more than once, the Compiler uses the last setting:
1. Directives set in project properties
2. System-wide directives file, i.e. COBOL.DIR
3. $SET statements in the source code
4. User directives file, i.e. USE(aFile.DIR)
From the command line, the order is a follows:
1. System-wide directives file, i.e. COBOL.DIR
2. $SET statements in the source code
3. User directives file (i.e. USE"aFile.DIR") or inline directives
If for example ANIM is defined in UserDefined.DIR and the command line is done as follows:
COBOL Program1.CBL USE(UserDefined.DIR) NOANIM;
The last specified directive will be used by the compiler, i.e. NOANIM, so no IDY file will be produced. If the order of USE and NOANIM are switched, then the ANIM in the directive will be used by the compiler.
Note: USE(directivefile) = USE"directivefile"