Directive sets are files that contain a number of directives that can be applied to each level of a project: at the project level, build configuration, folder level, or file level.
These files can be user created, or more commonly are automatically created when a Compiler directive is set at a particular level of the project, from the Properties dialog box. The directives are written to an .mfdirset file, which is stored in a project's .settings folder for project- and build configuration-level directives, and file-level directives that are not stored in a user-created folder. Directives applied at folder level (and files within that folder) are stored in a separate .settings sub-folder within the user-created folder.
.mfdirset files are prefixed with a language identifier:
Language | .mfdirset file prefix |
---|---|
Assembler | .asm |
BMS | .bms |
COBOL | .cbl |
DBD | .dbd |
PSB | .psb |
MFS | .mfs |
For example, COBOL directives would be stored in a .cbl.mfdirset file. Directives set at the file level generate .mfdirset files that are additionally prefixed with the program name; for example, if you edit the file properties for MyProg.cbl, specifying a directive via the Additional Directives field, a directive set is stored in the .settings folder as MyProg.cbl.mfdirset.
You can also create your own .mfdirset files either by copying and amending an existing .mfdirset file, or by using the schema template shown in Creating an .mfdirset File.
Reusing directive sets can be a quick and consistent way of applying a common set of directives to your projects. You can apply multiple directive sets at any level of a project, and also control the order in which they are processed.
The ordering is important, as a directive specified in multiple sets will take the last value processed, overriding previous values. Once the list of directive sets has been processed for a particular level, the directives explicitly specified (via Additional Directives) at that level are then also processed; for example, if you apply a number of directive sets to a particular folder, and one of those sets includes DIALECT"ENTCOBOL", this could be overridden if you also edit the folder properties, and specify DIALECT"MF" as an additional directive.