
The Micro Focus compiler options are listed here alphabetically, you may browse them, click on the link to go directly to the error code or you may use the search feature of your browser to search for the information.
Parameters:
integer Must be 1 or 2. The level of support required.
Properties:
Default: NOJAPANESE
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: The possible values of (integer) are:
See also:
DBCS Compiler directive
DBSPACE Compiler directive
NCHAR Compiler directive
Properties:
Default: KEEP-INT
Phase: Syntax check
Environment: All
$SET: Any
Remarks: The Compiler also accepts the directive name without hyphens; that is KEEPINT.
This directive is not available in the Micro Focus COBOL system for DOS, Windows and OS/2 without Toolset, Workbench or similar add-on products from Micro Focus. Do not change its setting unless you have an appropriate system. In the case of segmented programs, should any segment have an unsuccessful compilation with NOKEEP-INT selected then intermediate code is not produced for any of the segments.Parameters:
integer Must be between 0 and 7.
Properties:
Default: NOKEYCOMPRESS
Phase: Syntax check
Environment: All
$SET: Any
Remarks: (integer) can contain any combination of the following values:
Properties:
Default: NOLIBRARIAN
Phase: Syntax check
Environment: All
$SET: Any
Remarks: The -INC statement specifies a file for inclusion in the source program. The string -INC must be written as a contiguous sequence of upper case characters starting in column 1, followed by one or more spaces, and then, on the same line, by the name of a file containing COBOL source. This file is included in the program at the point where the -INC statement appears.
Properties:
Default: NOLINKCHECK
Phase: Generate
Environment: 16-bit
$SET: Initial
Remarks: The PARAMCOUNTCHECK directive must also be specified if you intend to use the LINKCHECK directive.
If reference is made to a Linkage Section item that does not exist, a run-time error 203 (CALL parameter not supplied) is generated.See also:
PARAMCOUNTCHECK Compiler directive
Parameters:
integer The number allowed.
Properties:
Default: LINKCOUNT"64"
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: The LINKCOUNT directive is only required if your program contains file or data records (in the Data Division) that are marked as EXTERNAL. If you have none of these, you can allocate as many Linkage Section records as you like.
If you do have external items in your Data Division, when it encounters the first such item, the compiler has to create a fixed length area to contain the references to all external areas and Linkage Section items. In this case, you use the LINKCOUNT directive to specify how many references this area needs to hold. It must be enough for all the external data items and Linkage Section items in your program. (integer) must not be less than the total number of Linkage Section data items, external data items, and external files. It represents a count of every separately-addressable data item in these structures.Parameters:
library-names The names of one or more link libraries.
Properties:
Default: LINKLIB"COBLIB+COBAPI"
Phase: Generate
Environment: 16-bit
$SET: Initial
Remarks: Specifying a library-name of NUL is the same as NOLINKLIB. The choice of library can be subsequently overridden by a directive to the linker.
Library names must be separated by a plus sign (+). If (library name) has no extension, .lib is assumed.Parameters:
destination A full file specification or a device-name.
Properties:
Default: NOLIST
Phase: Both
Environment: All (syntax check), 16-bit (generate)
$SET: Any (for LIST and NOLIST)
None (for LIST"
Dependencies:
NOLIST sets NOFORM, NOREF, NOSETTING, NOSOURCEASM and NOXREF at end.
LIST sets FORM"60" immediately.
Set to LIST by ASM immediately.
Set to NOLIST by RNIM at end.
Remarks: If you specify an existing file, it is overwritten.
When NOLIST is specified, no source listing is produced. If you specify LIST with no (destination), the source listing is sent to the screen. If you specify either (destination) or (), you cannot use this directive in a $SET statement. (destination) can be the name of any suitable device. On DOS, Windows and OS/2, use CON: for the screen. On UNIX, the device selected must not be under the control of a system spooler. NOLIST and LIST with no parameter can be used in $SET statements in a program to list selected parts of the program. The destination of the listing cannot be changed in this way. LIST() causes the source listing to be put in the file (source-name).lst, where (source-name) is the root of the name of the program being compiled. When used with the 16-bit Generator this creates the file (source-name).grp. Example: If you want to list the source to a file for every compilation you do, place the LIST() directive in the cobol.dir file. This overrides the default NOLIST. Alternatively, if you already have a LIST directive in your cobol.dir, making every listing go to the screen, you can override it by using LIST() on the command line.Parameters:
list-path - Path to which the list file is written, or an environment
variable specifying the path to which the list file is
written.
Properties:
Default: NOLISTPATH
Phase: Syntax check
Environment: All
$SET: Initial
Parameters:
width Width in characters. It must be between 72 and 132.
Properties:
Default: LISTWIDTH"80"
Phase: Syntax check
Environment: All
$SET: Any
Dependencies: If REF is set, and (width) is less than 90, sets LISTWIDTH"90" immediately. If (width) is less than 90, sets NOREF at end.
Remarks: LISTWIDTH"132" causes additional information to be displayed for each line listed. This includes the first eight characters of the current copyfile name (spaces for the main file) together with the number of the line relative to the start of that file.
See also:
REF Compiler directive
Parameters:
integer Must be 1 or 2.
Properties:
Default: NOLITLINK
Phase: Generate
Environment: 16-bit, and 32-bit on Windows NT and OS/2
$SET: Initial
Dependencies:
If OMF"GNT", LITLINK sets OMF"OBJ" at end.
Set to LITLINK at end by MODEL"SMALL", MODEL"COMPACT" or OBJLITE.
If ASSUME is set, set to LITLINK at end by REGPARM"OUT".
Remarks: This directive only affects .obj files.
With NOLITLINK on 16-bit and LITLINK"2" on 32-bit, if the name in a CALL (literal) statement starts with a single underscore - "_(name)" - a litlinked call to entry-name _(name) is generated. If it starts with a double underscore - "__(name)", a litlinked call to entry-name (name) is generated. (That is the entry names are declared as public symbols.) With LITLINK on all environments or LITLINK"1" on 32-bit, all CALL (literal) statements generate litlinked calls, regardless of the inclusion of underscores at the start of the literal. With NOLITLINK on 32-bit, no CALL (literal) statements generate litlinked calls, regardless of the inclusion of underscores at the start of the literal. LITLINK"2" is only intended to provide backward compatibility with code written for the 16-bit COBOL system. You should use call-convention 8 for new programs.Parameters:
integer A number up to 4. The number of bytes to pass.
Properties:
Default: LITVAL-SIZE"4"
Phase: Syntax check
Environment: All
$SET: Any
Properties:
Default: NOLNKALIGN
Phase: Generate
Environment: 32-bit
$SET: No
Remarks: Using LNKALIGN can reduce the time needed to access a linkage item at run time. However, take care when using it. You must use the correct ALIGN directive setting when compiling your program. No checks are made to ensure that the items are aligned.
The results of using this directive are machine-dependent, and you should not use it if you are in any doubt as to its effect. Unpredictable results might occur if you pass linkage items that are not aligned.See also:
ALIGN Compiler directive
Parameters:
integer Must be in the range 0 to 65536
Properties:
Default: LOCALCOUNT"0"
Phase: Syntax check
Environment: All
$SET: Initial
Parameters:
integer 0 or 1. The type of locking.
Properties:
Default: LOCKTYPE"0"
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: The possible values of (integer) are:
See also:
CALLFH Compiler directive
Properties:
Default: NOLOGICOPT
Phase: Generate
Environment: 32-bit
$SET: No
Remarks: Specifying LOGICOPT optimizes COBOL logical calls, such as CBL_AND, so that they do not affect RETURN-CODE.
Parameters:
Properties:
Default: No reserved word synonyms are created.
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: The equals sign must be surrounded by spaces.
This directive does not appear in the list created with the SETTING directive.Properties:
Default: NOMAPNAME
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: Specifying MAPNAME affects program-names and entry-points defined in the compilation and those referenced by the program as follows:
Properties:
Default: NOMASM
Phase: Generate
Environment: 16-bit
$SET: Initial
Dependencies:
MASM sets NOFORM at end.
Set to NOMASM by NOASM or OMF"GNT".
Remarks: This directive only affects .obj files.
You could use this directive to investigate the performance of small sections of code, as it enables you to edit the generated output. You should only use this directive on programs with one code segment, or the code produced does not work correctly. You must set the ASMLIST directive to specify the destination of the MASM-compatible listing. You can still use SOURCEASM to enable you to include source lines as comments. An .obj file is still generated, although it might differ slightly from the .obj file produced by MASM.Parameters:
Properties:
Default: NOMAX-ERROR
Phase: Syntax check
Environment: All
$SET: Any
Remarks: The Compiler also accepts the directive name without hyphens; that is MAXERROR.
If the maximum number of messages of at least the specified severity is reached then the compile stops. The messages are only counted if produced and after any modification to the severity of the message. Example: Specifying the directive:See also:
CHANGEMESSAGE Compiler directive
FLAG Compiler directive
FLAGAS Compiler directive
FLAGSTD Compiler directive
HIDEMESSAGE Compiler directive
WARNING Compiler directive
Properties:
Default: MFCOMMENT
Phase: Syntax check
Environment: All
$SET: Any
Dependencies: Set to NOMFCOMMENT at end by SOURCEFORMAT"FREE".
Remarks: With MFCOMMENT, lines with an asterisk in column 1 are ignored by the Compiler and do not appear in the source listing (though they do appear in Animator). With NOMFCOMMENT, the asterisk forms part of the sequence number and has no special significance.
Parameters:
integer The level of Micro Focus COBOL to be compatible with.
Properties:
Default: MF"10"
Phase: Syntax check
Environment: All
$SET: Initial
Dependencies:
MF"7" sets DBCS"2" immediately.
If (integer) > 7, sets DBCS"3" and DBSPACE immediately.
If NOEARLY-RELEASE and MF are set, MF defaults to MF"10".
If EARLY-RELEASE and MF are set, MF defaults to MF"11".
Remarks: The possible values of (integer) are:
See also:
EARLY-RELEASE Compiler directive
OLDBLANKLINE Compiler directive
OLDNEXTSENTENCE Compiler directive
Parameters:
oo-level Level of OO implementation. Current level is 1.
Properties:
Default: MFOO
Phase: Syntax check
Environment: All
$SET: Initial
Dependencies: MFOO sets MF immediately
Properties:
Default: NOMFSCCS
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: This directive is only available in Workbench and Toolbox. Do not change its setting unless you have the appropriate system.
If you are using the Micro Focus COBOL Workbench SCCS interface, specifying MFSCCS causes the Compiler to search the SCCS if it cannot find a file.Parameters:
type SMALL, COMPACT, MEDIUM, LARGE, or HUGE.
Properties:
Default: MODEL"HUGE" (for programs with more than 64K of data)
MODEL"LARGE" (for programs with less than 64K of data)
Phase: Generate
Environment: 16-bit
$SET: Initial
Dependencies: MODEL"SMALL" and MODEL"COMPACT" set LITLINK at end.
Remarks: This directive only affects .obj files.
The possible values of (type) are:If you specify a model of SMALL, MEDIUM or COMPACT, the LITLINK directive is set automatically, requiring you to resolve all external references to the linker.
Local-Storage Section is only supported for LARGE and HUGE models.
Dynamic calling is supported only in LARGE or HUGE model, as by its nature dynamic calling gives large code and large data.
Programs with a Data Division less than 64K are treated as MODEL"LARGE".
When linking a program compiled with MODEL"SMALL" or MODEL"MEDIUM" for use on OS/2, you must use the linker option /DOSSEG.
Parameters:
version Must be 1 or 2. The version.
Properties:
Default: NOMS
Phase: Syntax check
Environment: All
$SET: Initial
Dependencies: MS sets DEFAULTBYTE"0" and ACCEPTREFRESH immediately.
Remarks:
The possible values of
See also:
MF Compiler directive
Parameters:
coll-seq Either "ASCII" or "EBCDIC".
Properties:
Default: NATIVE"ASCII"
Phase: Syntax check
Environment: All
$SET: Initial
Dependencies:
Set to NATIVE"ASCII" immediately by CHARSET"ASCII".
Set to NATIVE"EBCDIC" at end by CHARSET"EBCDIC".
Remarks: For more details, see the rules for PROGRAM COLLATING SEQUENCE in your Language Reference.
The keys in an indexed file are always ordered by the ASCII collating sequence.Parameters:
integer Must be 1 or 2. The level of support required.
Properties:
Default: NONCHAR
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: The possible values of (integer) are:
See also:
DBCS Compiler directive
DBSPACE Compiler directive
JAPANESE Compiler directive
Properties:
Default: NONESTCALL
Phase: Syntax check
Environment: All
$SET: Initial
Dependencies: NESTCALL sets NO01SHUFFLE at end.
Properties:
Default: NONESTLOCALSTORAGE
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: The NESTLOCALSTORAGE directive is Early User Syntax support. You must set the EARLY-RELEASE directive to enable this feature. This directive might change or be removed in a later revision of this system.
See also:
EARLY-RELEASE Compiler directive
Properties:
Default: NONLS
Phase: Syntax check
Environment: All
$SET: No
Remarks: NLS enables your program to adapt itself automatically at run time to the character set, currency symbol and editing symbols appropriate to your user's country.
See also:
National Language Support routines