
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.
Causes all format 1 ACCEPT, DISPLAY and EXHIBIT statements to be routed through the specified handler. The output generated by TRACE is also routed through the specified handler.
Parameters:
handler-name Root-name of a program to be called to act as the handler.
Properties:
Default: NOCALLADIS
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: The CALLADIS 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 product.
If
See also:
EARLY-RELEASE Compiler directive
Makes the Compiler generate direct calls for all file I/O operations, using the Callable File Handler interface.
Parameters:
handler-name Root-name of a program to be called to act as the file
handler.
Properties:
Default: NOCALLFH (on DOS, Windows and OS/2)
CALLFH"EXTFH" (on UNIX)
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: (handler-name) can be one of the following:
If NOCALLFH is specified, file I/O is handled by the run-time system. When CALLFH is specified, all file I/O statements are converted to calls to the file handler specified by the directive.
If
This directive is also used to direct all file handling calls through converter modules, such as XFH2BTR, to make use of non-COBOL file handlers.
Toolset and Toolbox provide information that enables you to create your own file handler. Use this directive to make your programs call your file handler instead of the standard file handler.
This directive is reserved for internal use by the system. Because it might appear in the list of settings, it is included for completeness. It is not intended for users' applications, and its setting should not be changed.
Causes all Message Control System operations to be routed through the specified handler.
Parameters:
mcs-name Root-name of a program to be called to process message
control system (mcs) operations.
Properties:
Default: NOCALLMCS
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: If
Defines the program to be called to handle all SORT and MERGE operations.
Parameters:
sort-name Root-name of a program to be called to process sorts and
merges.
Properties:
Default: CALLSORT"_SORT" (on DOS, Windows and OS/2)
NOCALLSORT (on UNIX)
Phase: Syntax check
Environment: All
$SET: Initial
Makes the Compiler close an .lbr file used as a library in a COPY statement once that copy operation is complete.
Properties:
Default: CANCELLBR
Phase: Syntax check
Environment: All
$SET: Any
Remarks: 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.
NOCANCELLBR causes such .lbr files to be left open until the end of the compilation. Subsequent COPY statements that do not specify a library search for the copyfile in all open .lbr libraries (last one opened is searched first) before the current directory.
This directive is only relevant if COPYLBR is on.
[NO]CANCELLBR can be used on any $SET. Only .lbr libraries referenced in COPY statements after the $SET are affected. Any left open from previous COPY statements are only closed if specified again on a COPY statement following a CANCELLBR directive.
Prevents external symbols (such as Program-ID and names of called programs) being converted to upper case.
Properties:
Default: NOCASE
Phase: Generate
Environment: 16-bit
$SET: Any
Remarks: This is useful if you are calling a program written in C, where names are case dependent.
Changes the severity of errors/messages. Messages can also be supressed or returned to their original severity.
Parameters:
Properties:
Default: NOCHANGE-MESSAGE
Phase: Syntax check
Environment: All
$SET: Any
Dependencies: CHANGE-MESSAGE overrides the general settings of directives such as FLAGAS.
Remarks: CHANGE-MESSAGE can take as many parameter pairs as required. If CHANGE-MESSAGE is specified multiple times the effects are cumulative.
CHANGE-MESSAGE replaces the HIDE-MESSAGE Compiler directive. However, if you use HIDE-MESSAGE in conjunction with CHANGE-MESSAGE the effects are also cumulative.
Serious errors cannot have their severity reduced unless they were changed to serious (from a lower severity) by another CHANGEMESSAGE directive or the FLAGAS or FLAGCD directives.
Examples:
CHANGE-MESSAGE(ALL R)
CHANGEMESSAGE(10 S 135 E 100 N)
See also:
FLAGAS Compiler directive
FLAGCD Compiler directive
HIDE-MESSAGE Compiler directive
Defines the character set of the environment.
Parameters:
char-set ASCII or EBCDIC.
Properties:
Default: CHARSET"ASCII"
Phase: Syntax check
Environment: All
$SET: Initial
Dependencies:
Remarks: To use this directive you must have the full Micro Focus COBOL Workbench system.
Do not change its setting if your application is to be linked with the static-linked run-time system, lcobol.
All literals and collating sequences are handled in the character set specified.
For current limitations see your Workbench documentation.
Controls the behavior of your program if it tries to divide by zero in a statement that has no ON SIZE ERROR phrase.
Parameters:
dialect Must be ANSI, OSVS, VSC2, or COBOL370.
Properties:
Default: CHECKDIV"ANSI"
Phase: Both (16-bit), Syntax check (32-bit)
Environment: All
$SET: Initial
Remarks: With CHECKDIV or CHECKDIV"ANSI" specified, the program continues with an undefined result if it tries to divide by zero. With NOCHECKDIV set, the behavior is undefined. Setting NOCHECKDIV results in optimal code for divides.
Specifying CHECKDIV"OSVS", CHECKDIV"VSC2", or CHECKDIV"COBOL370" has the same effect; trying to divide by zero produces run-time error 48 (Attempt to divide by zero (fatal)). This error can be disabled using the -O RTS switch.
This directive has no effect on arithmetic statements that use the ON SIZE ERROR phrase.
See also:
O RTS switch
Checks whether numeric fields contain valid data before performing operations on them.
Properties:
Default: NOCHECKNUM
Phase: Generate
Environment: 16-bit
$SET: Initial
Remarks: Specifying this directive causes extra code to be generated to ensure that numeric fields contain valid data before any operations are performed on them. With CHECKNUM set, run-time error message 163 (Illegal character in numeric field (fatal)) is displayed if any numeric field is found to contain nonnumeric data. This error can be disabled using the -F RTS switch.
Specifying CHECKNUM causes extra code to be produced, reducing the efficiency of your programs. For smaller, faster code you should not specify CHECKNUM.
See also:
F RTS switch
Adds code to all calls to check the stack and report if an incorrect number of parameters has been passed.
Properties:
Default: NOCHECKSTACK
Phase: Generate
Environment: 16-bit
$SET: Initial
Remarks: Extra code is add for all calls, including calls to the system library routines (CBL_).
If an incorrect number of parameters has been used, the code tries to detect the resulting stack corruption and give a Run-time System error 168 at run-time.
The extra instructions slightly reduce run-time performance, so the directive should only be used when debugging.
Tells the Compiler that a specific microprocessor architecture is in use.
Parameters:
integer Must be 16.
Properties:
Default: CHIP"16"
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: The information produced is only relevant for 16-bit environments.
In the case of the Intel 80x86 family, the use of CHIP"16" indicates that the maximum segment addressability is given by 16 bits, and anything over this size is split over an addressing boundary. Knowing this, the Compiler can alter certain code structures to avoid potential crossing boundaries conditions (for example, the internal print buffer used with Report Writer syntax).
When used with the directive FLAG-CHIP, this directive causes the Compiler to indicate chip specific boundary conditions. These might indicate potential problems or performance losses on the particular chip.
Enables the use of CICS by updating BLL cells.
Properties:
Default: NOCICS
Phase: Syntax check
Environment: All
$SET: No
Remarks: This directive is reserved for use with add-on CICS products supplied by Micro Focus. Do not change its setting unless you have an appropriate add-on product. This is not for use with CICS OS/2.
With CICS, if CICS-CPY is also set, the Compiler inserts:
The Linkage Section item following the DFHCOMMAREA record is assumed to contain the BLL cells, each named and with the description PIC S9(8) COMP. The BLL cells are matched with the corresponding Linkage Section records according to CICS rules.
If the Compiler inserts the DFHCOMMAREA record, it is not visible during animation or in printer listings. However, the record can be queried during animation. If you intend to animate a program that uses BLL cells, set this directive on.
Inserts the statement COPY "CICS.CPY" provided the CICS directive is specified.
Properties:
Default: CICS-CPY
Phase: Syntax check
Environment: All
$SET: No
Remarks: This directive is reserved for use with add-on CICS products supplied by Micro Focus. Do not change its setting unless you have an appropriate add-on product. This is not for use with CICS OS/2.
See also:
CICS Compiler directive
Optimizes the handling of CICS BLL cells.
Properties:
Default: NOCICSOPTIMIZE
Phase: Syntax check
Environment: All
$SET: No
Remarks: This directive is reserved for use with add-on CICS products supplied by Micro Focus. Do not change its setting unless you have an appropriate add-on product. This is not for use with CICS OS/2.
With NOCICSOPTIMIZE, the Compiler inserts instructions whenever a BLL-cell is updated to ensure that the addressability of Linkage Section items corresponds to the current values in the BLL cells. With CICSOPTIMIZE, the Compiler does not insert these instructions. You must use the SERVICE RELOAD instruction to ensure that the addressability is updated.
For compatibility with the mainframe compiler option of the same name which returns behavior of the COBOL 370, VS COBOL II version 3 and VS COBOL II version 4 compilers to that of the VS COBOL II version 2 compiler.
Properties:
Default: NOCMPR2
Phase: Syntax check
Environment: All
$SET: Initial
Dependencies: Requires VSC2"3", VSC2"4" or COBOL370 flagging to be selected.
Remarks: A conflicting directives message is issued (with FLAGCD only) if one of the required flagging levels is not selected.
Setting this directive is not quite the same as setting VSC2"2". It emulates the mainframe behavior quite closely, and also causes different run-time behavior in some cases. If you use this directive on the mainframe with one of the specified compilers, use this directive instead of VSC2"2".
The FLAGMIG directive flags the items that give different run-time behavior.
See also:
FLAGMIG Compiler directive
Causes the Callable File Handler ExtFH to use the user-supplied module specified in the COBFSTATCONV environment variable to convert the file status codes if an I/O error is encountered on a file.
Properties:
Default: NOCOBFSTATCONV
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: 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.
Specifies the path where the Animator information file (.idy file) and COBOL Source Information file (.csi) are to be written.
Parameters:
path-name Path specification.
Properties:
Default: NOCOBIDY
Phase: Syntax check
Environment: All
$SET: No
Remarks: If you do not specify
The .csi files are only produced if the CSI directive is used. This should only be used if you have Toolbox or Workbench.
See also:
CSI Compiler directive
Specifies that words reserved in IBM COBOL/370 are to be treated as reserved words, and allows features selectively for compatibility with a given level of that product.
Parameters:
integer Must be 1. The level of IBM COBOL/370 to be compatible
with.
Properties:
Default: NOCOBOL370
Phase: Syntax check
Environment: All
$SET: Initial
Dependencies: COBOL370 sets DBSPACE and DBCS"3" immediately.
Remarks: Specifying COBOL370 without a parameter is the same as specifying COBOL370"1". This specifies compatibility with Version 1 Release 1 of IBM COBOL/370.
Specifies whether the checker should process the directives in a cobol.dir file or ignore it.
Properties:
Default: COBOLDIR
Phase: Syntax check
Environment: All
$SET: No
Makes the Compiler produce very compact and efficient code for some statements involving COMP data items, by treating COMP items as COMP-X.
Properties:
Default: NOCOMP
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: This COMP code produced by the Compiler behaves in a way that is not the ANSI standard in cases of numeric overflow. You should use this directive only if you know that your program does not lead to numeric overflow, or if you want to use the defined (but nonstandard) behavior on overflow.
Specifies whether the sign is to be dropped when a value is stored in an unsigned COMP-5 data item.
Parameters:
integer Must be 1 or 2.
Properties:
Default: COMP-5"2"
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: The possible values of (integer) are:
Specifies whether COMP-6 data is to be held in binary or packed decimal format.
Parameters:
integer Must be 1 or 2.
Properties:
Default: COMP-6"2"
Phase: Syntax check
Environment: All
$SET: Initial
Dependencies: RM or ADDRSV"COMP-6" must be set.
Remarks: The possible values of (integer) are:
Even if you specify the COMP-6 directive, the reserved word COMP-6 is recognized only if it belongs to the chosen dialect or the directive ADDRSV"COMP-6" is specified.
Example: With COMP-6"2" specified:
PIC 99 COMP-6 VALUE 87 is stored in one byte as x"87"
PIC S99 COMP-6 VALUE 87 is stored in two bytes as x"087C"
Allows your program to contain syntax introduced in the Communications Module of the ANS85 COBOL Standard.
Properties:
Default: NOCOMS85
Phase: Syntax check
Environment: All
$SET: Initial
Makes the Compiler echo all subsequent directives to the screen.
Properties:
Default: NOCONFIRM
Phase: Both
Environment: All (syntax check), 16-bit (generate)
$SET: No
Dependencies: Set to CONFIRM immediately by VERBOSE.
Declares a constant for use in the program.
Parameters:
Properties:
Default: Not set
Phase: Syntax check
Environment: All
$SET: Any
Remarks: The effect is as if the constant
To declare several figurative constants using this feature, use the CONSTANT directive repeatedly.
Specifies whether POINTER data items can be redefined as PIC 9(9) COMP data items.
Properties:
Default: NOCONVERTPTR
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: IBM VS COBOL II and COBOL/370 let you use the REDEFINES clause on a POINTER data item, to redefine it as a PIC 9(9) COMP data item. You can then perform arithmetic operations on this item, giving the program the ability to shift the address referred to by a pointer up or down.
If CONVERTPTR is specified, pointers are held in a form that is reversed with respect to native byte ordering. They are converted to the native form immediately before any SET ADDRESS OF linkage-item TO pointer statement, and immediately after any SET pointer TO ADDRESS OF ... statement.
The CONVERTPTR directive has no effect on PROCEDURE-POINTER data items.
On 16-bit systems, unexpected behavior might occur if the arithmetic carried out causes the pointer to cross the boundary of a data segment.
Causes COMP and COMP-X items specified in CALL ... RETURNING and EXIT PROGRAM ... RETURNING phrases to be converted to COMP-5.
Properties:
Default: NOCONVERTRET
Phase: Syntax check
Environment: All
$SET: Initial
Converts double-byte space characters in COBOL source files to single-byte spaces on input.
Properties:
Default: CONVSPACE
Phase: Syntax check
Environment: All
$SET: Initial
Specifies the file-name extension of the copyfile that the Compiler is to look for if a file-name in a COPY statement is specified without an extension.
Parameters:
extension A file-name extension.
Properties:
Default: COPYEXT"cbl,cpy" (on DOS, Windows and OS/2)
COPYEXT",cbl,cpy" (on UNIX)
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: Up to four extensions can be specified, each extension being up to 10 characters long. An extension of null is used to represent an extension of spaces.
If you have many COPY statements that do not specify an extension, using COPYEXT can improve the compilation speed of your program. For example, if all of your copyfiles have the extension .cpy, specifying COPYEXT"CPY,CBL" would avoid unnecessary file access attempts.
The behavior of this directive is affected by the setting of the OSEXT
directive. The extension specified by the OSEXT directive overrides the first
extension specified by the COPYEXT directive. For example:
COPYEXT"cpy,cbl,txt" OSEXT"src"
would have the same effect as:
COPYEXT"src,cbl,txt"
See also:
OSEXT Compiler directive
Makes the Compiler treat the library specified in a COPY statement as an .lbr file.
Properties:
Default: NOCOPYLBR
Phase: Syntax check
Environment: All
$SET: No
Remarks: 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.
With NOCOPYLBR, the Compiler assumes that the library is a path-name.
Makes the Compiler list the contents of files named in COPY statements.
Parameters:
integer Must be 0 or between 50 and 99.
Properties:
Default: COPYLIST
Phase: Syntax check
Environment: All
$SET: Any
Remarks: (integer) is the number of a COBOL segment. It must be 0 or in the range 50 through 99. If it is not specified, the contents of all copyfiles are listed. If it is specified, the contents of all copyfiles in the first three divisions (that is, the Identification, Environment and Data Divisions), the root, and the given segment are listed. An integer of 0 refers to the first three divisions and all root segments.
NOCOPYLIST prevents the listing of the contents of any copyfiles. If a
segment-number is specified with NOCOPYLIST, only copyfiles in that segment
are listed. For example:
COPYLIST"53" List all copyfiles in the first three divisions, the root
segment, and segment 53.
NOCOPYLIST"53" List only copyfiles that are in segment 53.
Whatever the state of this directive, the name of any copyfile open when a page heading is output is given in that heading.
Makes the Compiler produce extra information so that you can use CSI.
Properties:
Default: NOCSI
Phase: Syntax check
Environment: All
$SET: No
Dependencies: CSI sets ANIM at end.
Remarks: This directive is reserved for use with products containing CSI, such as Workbench and Toolbox. Do not change its setting unless you have an appropriate add-on product.
The CSI file has extension .csi. Its location is controlled by the COBIDY directive.
See also:
COBIDY Compiler directive
Specifies the currency sign to be recognized in the PICTURE clause.
Parameters:
integer ASCII code of the character, in decimal.
Properties:
Default: CURRENCY-SIGN"36" (that is, "$")
Phase: Syntax check
Environment: All
$SET: Initial
Remarks: You cannot specify a valid PICTURE clause symbol. See your Language Reference for a list of these.
Specifies the format of the date stored in the CURRENT-DATE special register.
Parameters:
date-format Either DDMMYY or MMDDYY.
Properties:
Default: CURRENT-DATE"MMDDYY"
Phase: Syntax check
Environment: All
$SET: Any
Remarks: The DDMMYY parameter causes CURRENT-DATE to be stored in European format. The parameter can be specified in either upper case or lower case.