Chapter 7: Directives for Compiler

This chapter lists and describes the directives you can use to control the Compiler. The first section is intended to help you find directives for particular purposes; it lists their names, organized into categories, with a very brief description of the purpose of each. The second section contains complete descriptions of the directives, in alphabetical order.

See the section Setting Directives in the chapter Using the Compiler for information on setting directives.

7.1 Directives by Category

Below is a list of categories of Compiler directives. Select a category to see a list of directives in that category. You can then select a directive to see its parameters and other details.

Enabling Language Features
Run-time Behavior
Multi-threading
Compiler Control
Compiling for Debugging and Analysis
Format of Your Data Files
Object Code, Size and Optimization
Reserved Directives

An asterisk next to the description of a directive means you need an add-on product before you can use it. If you use it without the appropriate add-on product, the Compiler does not give an error message but the directive does not have the desired effect.

7.1.1 Enabling Language Features

These directives change which language features your Compiler accepts.

7.1.1.1 Add Features

CICS * Enable CICS
CICS-CPY * Insert COPY "CICS-CPY"
CONSTANT Define constant
DB2 Replace EXEC SQL code by DB2 Universal Database API calls
FCDREG Registers for files
PREPROCESS Source from preprocessor
REWRITE-LS REWRITE on LINE SEQUENTIAL files
SEQCHK Check line numbers
SOURCEFORMAT Enable free format code
SQL Replace EXEC SQL code by ODBC or OCI run-time calls

7.1.1.2 Dialect

ACTUAL-PARAMS Specify actual parameters that are substituted for formal parameters in a parameterised class.
ANS85 ANSI'85
COBOL370 IBM COBOL/370
COMS85 ANSI'85 Communications
DBCHECK Check for DBCS
DBCS DBCS Support
DG Data General
DIALECT Enable check-time and run-time behavior consistent with a specified dialect
DOSVS IBM DOS/VS COBOL
FLAG Flag for dialect
FLAGCD Flag conflicts
FLAGSTD Flag ANSI'85 level
IBM-MS IBM / Microsoft COBOL V1.0
ISO2000 ISO2000
JAPANESE Double-byte extensions
MF Level of Micro Focus COBOL
MS Microsoft COBOL V1 or V2
NCHAR Double-byte extensions
OOCTRL OO program language elements
OSVS IBM OS/VS COBOL
PC1 IBM / Microsoft COBOL V1.0
RM Ryan-McFarland
SAA Systems Application Architecture
VSC2 IBM VS COBOL II
XOPEN X/Open

7.1.1.3 Mainframe Compatibility

AREACHECK Area A check
CMPR2 Mainframe compatible
DIALECT Enable check-time and run-time behavior consistent with a specified dialect
DBCSSOSI Shift-in, -out
LIBRARIAN Allow -INC
MAPNAME IBM program-names
PANVALET Allow ++INCLUDE
PROGID-COMMENT Comment in PROGRAM-ID
RDW Variable length records
TRUNCCOPY Copyfile-names

7.1.1.4 Reserved Word Control

ADDRSV Add reserved word
ADDSYN Add synonym
MAKESYN Make synonymous
OVERRIDE Change meaning
REMOVE De-reserve

7.1.1.5 Compilation Speed

QUAL Allow qualification
QUALPROC Allow qualification
SEG Allow segmentation
TRICKLE Restrict PERFORM

7.1.2 Run-time Behavior

These directives change the definition of language features and so change the logic of your program.

Some directives listed under Dialect also affect behavior.

ACCEPTREFRESH ACCEPT statement
ARITHMETIC Evaluate expressions
ASSIGN EXTERNAL or DYNAMIC
ASSIGN-PRINTER Printer output
BWZSTAR BWZ with PIC *
CHARSET ASCII or EBCDIC
CHECKDIV Allow divide by zero
CHECKNUM Check numeric fields
COBFSTATCONV EXTFH status codes
CONVERTRET RETURNING item type
CURRENCY-SIGN Currency sign
CURRENT-DATE DDMMYY or MMDDYY
DEFAULTBYTE Initialize Data Division
DEFAULTCALLS CALL convention
DETECT-LOCK Detect record locks
EARLY-RELEASE Early user syntax
FOLD-CALL-NAME Fold call-name
FOLD-COPY-NAME Fold copyfile-names
HOST-NUMCOMPARE Numeric comparisons
INDD Transform ACCEPTs to READs
INITCALL Execute a module
IXNLSKEY Sort index file keys according to the local collating sequence
IXNUMKEY Enable true numeric sorting on index keys.
LOCKTYPE Read locked records
NATIVE Collating sequence
NLS National Language Support
OUTDD Transform DISPLAYs to WRITEs
PRINT-EXT Printing extension
PROTECT-LINKAGE Protect linkage
REPORT-LINE Report Writer lines
SPZERO Space = zero in numerics
STICKY-LINKAGE Keep parameters linked
TERMPAGE Pad out report page
TRACE Enable READY TRACE
ZEROLENGTHFALSE Zero length tests
ZWB Numeric comparisons

7.1.2.1 Compatibility with Other COBOL Dialects

ALPHASTART Numbering in ALPHABET
CASE Case of program-name
COMP-6 COMP-6 items format
DBSPACE DBCS space
DIALECT Enable check-time and run-time behavior consistent with a specified dialect
FDCLEAR Clear record buffer after write
FP-ROUNDING Floating-point items
HOSTFD Record areas associated with a file should only be allocated at the time of an OPEN statement and not before
IBMCOMP Word-storage mode
INTDATE Starting date for integer format dates used with date intrinsic functions
ODOSLIDE Variable length table
OPTIONAL-FILE All files optional
PERFORM-TYPE Returns from PERFORM
RETRYLOCK Retry locked record
SIGN Included signs
SSRANGE Run-time checking of subscripts, indexes and reference-modified items
STICKY-PERFORM Behavior of PERFORM
SWITCH-TYPE ANSI-compatible switch behavior
SYMBSTART Numbering in SYMBOLIC
TRUNC Truncation of binary

7.1.2.2 Compatibility with Older Micro Focus Products

AUTOLOCK Default locking
COMP Computational subset
COMP-5 COMP-5 behavior
DE-EDIT Numeric-edited behavior
FILESHARE Default locking
IOCONV READ-INTO/WRITE-FROM
MF Level of Micro Focus COBOL
OLDBLANKLINE BLANK LINE
OLDINDEX Indexes = subscripts
OLDNEXTSENTENCE NEXT SENTENCE
OLDREADINTO READ INTO
OLDSTRMIX Allows PIC X and PIC N field in the same STRING, UNSTRING or INSPECT
WRITELOCK Default locking

7.1.2.3 Mainframe Compatibility

APOST QUOTE = '
BYTE-MODE-MOVE Control overlapping moves
DIALECT Enable check-time and run-time behavior consistent with a specified dialect
DYNAM Ignore CANCEL
FP-ROUNDING Floating-point items
HOSTNUMMOVE IBM MOVE statements
IBMCOMP Word-storage mode
MAPNAME IBM program-names
ODOOSVS OS/VS-style OCCURS DEPENDING ON
OLDCOPY ANSI'68 COPY
QUOTE QUOTE = "
REMAINDER Select how the remainder is calculated in a DIVIDE statement

7.1.2.4 Speed or Size

ALIAS Subscripts
ALIGN Data alignment
BOUND Bound-check
BOUNDOPT Optimize tables
CHECK Turn on all run-time checks in generated code
LINKCHECK Check Linkage Section items
PARAMCOUNTCHECK Omit parameters
PERFORMOPT Optimize PERFORM of empty paragraph

7.1.3 Multi-threading

REENTRANT Make program reentrant
SERIAL Make program serial

7.1.4 Compiler Control

7.1.4.1 Compile/Link Files

CANCELLBR Close COPY .lbr file
CONVSPACE Source code spaces
COPYLBR Copy library = .lbr file
INTLEVEL Portability level
KEEP-INT Keep .int files
KEYCHECK Check keys when a file is opened
P64 Compile a program for execution in a 64-bit run-time environment.
PREPROCESS Preprocess source
PROTOTYPE Enable relaxed or strict call prototype checking

7.1.4.2 Directives Control

COBOLDIR Use/ignore cobol.dir
CONFIRM Display directives
DIALECT Enable check-time and run-time behavior consistent with a specified dialect.
DIRECTIVES File of directives
DIRECTIVES-IN-COMMENTS Enable directives in comment lines
SETTING Print directives
SHOW-DIR Print directives files
USE File of directives

7.1.4.3 Error and Flag Messages

BRIEF No message texts
CHANGE-MESSAGE Change message severity
EDITOR Error file for Editor
ERRLIST Print messages only
ERRQ Pause on error
FLAG Flag outside the dialect
FLAGAS Show flags as errors
FLAGCD Conflicting directives
FLAGMIG OSVS and VSC2 differences
FLAGQ Pause on flag
FLAGSINEDIT Flags in error file
FLAGSTD Flag above ANSI'85 level
HIDE-MESSAGE Set message to hide
INFORETURN Information message return value
MAX-ERROR Limit number of Compiler errors
MOVE-LEN-CHECK Check source and target lengths for alphanumeric MOVE operations
QUERY Pause if copyfile missing
STDERR Write messages to STDERR
WARNING Level of message to output

7.1.4.4 Listing

COPYEXT Copyfile extensions
COPYLIST List copyfiles
DATAMAP List data items
DATE Date for listings
ERRLIST List source and error messages
FORM Page length
LINE-COUNT Controls detail of information at end of listing
LIST File for source listing
LISTPATH Specify the list-file path
LISTWIDTH Page width
MFCOMMENT Alternate-format comments
PREPLIST Preprocess debug list
PRINT File for source listing
RAWLIST Static list
REFNO Show Compiler version number in listings
RESEQ Generate line numbers
SEQCHK Check line numbers
SETTING Print directives
SHOW-DIR Print directives files
TIME Put time on listings
VERBOSE Compiler messages
XREF Produce cross-reference listing
ZEROSEQ Zeros in line numbers

7.1.4.5 Screen

BELL Beep when stop
CONFIRM Display directives
ECHO Display errors
ECHOALL Display full listing
SUPFF No page headings

7.1.5 Compiling for Debugging and Analysis

These directives make the Compiler create files containing extra information about the program, for input to software used for debugging.

ANIM For animating
COBIDY Path for Animator file
EDITOR Error file for Editor
FLAGSINEDIT Flags in error file
GNTANLZ Create generated program that can be analyzed by GNT Analyzer.
PROFILE For Profiler

7.1.6 Format of Your Data Files

These directives change the format in which data is stored in your data files.

CALLFH External file handler
DATACOMPRESS Data compression
FILETYPE Data file format
IDXFORMAT Indexed file structure
KEYCOMPRESS Key compression
RECMODE Fixed or variable length
SEQUENTIAL Variants of SEQUENTIAL organization

7.1.7 Object Code, Size and Optimization

These directives change the object code produced without changing the logic of your program.

7.1.7.1 External Handlers

CALLADIS External ACCEPT/DISPLAY
CALLFH External file handler
CALLMCS External MCS handler
CALLSORT External sort handler

7.1.7.2 File Handling

WRITETHROUGH Unbuffered writes

7.1.7.3 Interprogram Communication

LITLINK Literals public
LITVAL-SIZE BY VALUE size
RTNCODE-SIZE RETURN-CODE size

7.1.7.4 Size and Speed

CICSOPTIMIZE * Optimize BLL cells
HOSTSIGNS Illegal sign nibbles
LNKALIGN Assume linkage aligned
OPT Optimization level
SEG Segmentation
TARGET Chip specific instructions

7.1.8 Report Writer

This directive affects the behavior of the Report Writer control module:

RWHARDPAGE

7.1.9 Reserved Directives

These directives are reserved, or are maintained for compatibility with earlier products and have no effect. Do not use them.

ADV Adds control characters to print files

7.1.9.1 Internal or Future Use Only

ENSUITE
FASTSORT
FCD3
LOCALCOUNT
NESTLOCALSTORAGE
OLDFILEIO
WB2
WB3

7.2 Key to Compiler Directives

Descriptions for all of the Compiler directives appear alphabetically. Each description contains the following entries.

A brief description of the function of DIRECTIVE-NAME.

Syntax:

Syntax in the form:

                                 +--------------. 
                                 v              | 
 >>-.---.-.-------DIRECTIVE-NAME--"parameter(s)"-.-><  
    .-/-+ ..----.-DIRECTIVE-NAME-----------------+ 
           .-NO-+

The syntax of the Compiler directives is shown using diagrams called "railroad tracks", in which a directive and its parameters are shown joined by lines indicating the order in which they should be written. You read these diagrams from left to right. Each diagram starts with >> and ends with ><. Sometimes the track forks to show alternatives and then joins up again. The length of a track has no significance.

The loop over the parameter in the above example indicates that it can be repeated one or more times.

Parameters for directives are shown in quotation marks (" "), although you can use parentheses instead unless otherwise stated. On UNIX, the equals sign (=) can be used as an alternative. When quotation marks are used the parameter can contain spaces, whereas no spaces are allowed in a parameter surrounded by parentheses.

If you use quotation marks you must escape them using the backslash character (\). If the option contains an equals sign and you specify the option on the command line, you must use two equals signs.

For detailed information on using Compiler directives on the command line, see the section Option Configuration in the chapter COBOL System Interface (Cob).

The slash (/) in the syntax diagrams is for use on DOS, Windows and OS/2. It should be ignored for UNIX environments and does not appear in diagrams for UNIX-specific directives.

Parameters:

Lists and describes valid parameter(s), if any, for the directive.

Properties:
Default: Indicates the directive's default setting
Phase: Shows the phase controlled by this directive. One of:
Syntax check
Generate
Both
$SET: Shows whether you can put the directive on a $SET statement in your source program; "Initial" in this entry means it is only allowed on a $SET statement before the first line of COBOL code. The directives specified by a $SET statement in the source code must not exceed column 72.
Dependencies:

Shows if the setting of this directive changes the setting of any other directives, or if any other directives affect the setting of this directive.

There are a number of different cases, identified under this heading by the following keywords:

immediately The change specified is done immediately, as a part of the processing of this directive. This enables you to reset the value by specifying the second directive after the first. Don't do this unless you know what you are doing.
at end The change specified takes place when all the directives have been processed. This prevents you from overriding the new value.
Comments:

Contains any additional information about the directive.

In the menus, an asterisk (*) next to the name of a directive means you need an add-on product before you can use it. If you use it without the appropriate add-on product, the Compiler does not give an error message but the directive does not have the desired effect.

7.3 List of Directives


ACCEPTREFRESH

Specifies whether the data areas associated with Screen Section data are updated from their corresponding Working-Storage Section items before an ACCEPT statement.

Syntax:
 >>-.---.-.----.--ACCEPTREFRESH-------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOACCEPTREFRESH
Phase: Syntax check
$SET: Initial
Dependencies:

Set to ACCEPTREFRESH immediately by MS, IBM-MS or PC1.

Comments:

With ACCEPTREFRESH specified, before an ACCEPT statement that references a Screen Section data item, all data areas associated with Screen Section items subsidiary to the item being accepted are modified as follows:

With NOACCEPTREFRESH specified, the Screen Section data area is left as it was following the last ACCEPT or DISPLAY.


ACTUAL-PARAMS

Specifies actual parameters that are substituted for formal parameters in a parameterised class.

Syntax
 >>-.---.-.----.-ACTUAL-PARAMS--"parameters"------------------------><  
    .-/-+ .-NO-+
Parameters
parameters Between 1 and 32 space-separated parameters.
Properties
Default: NOACTUAL-PARAMS
Phase: Syntax check
$SET: Initial

ADDRSV

Adds one or more specific reserved words to the reserved word list so that they are recognized as reserved words in your program. The specified reserved words are added, whatever dialect directives are in force.

Syntax:
                   +----------. 
                   v          | 
 >>--.---.--ADDRSV--"rsv-word"--------------><  
     .-/-+
Parameters:
rsv-word A reserved word in some dialect of COBOL, but not necessarily in a dialect specified for this compilation
Properties:
Default: No additional reserved words are created.
Phase: Syntax check
$SET: Initial
Comments:

The specified reserved words are added, whatever dialect directives are in force.

This directive does not appear in the list created with the SETTING directive.

See Also:

SETTING Compiler directive


ADDSYN

Defines a user-defined reserved word to be synonymous with an existing reserved word.

Syntax:
 >>--ADDSYN-"rsv-word" = "user-word"-----><
Parameters:
rsv-word Existing reserved word.
user-word Any COBOL word not the same as an existing reserved word.
Properties:
Default: No reserved word synonyms are created.
Phase: Syntax check
$SET: Initial
Comments:

The equals sign (=) must be surrounded by spaces. You can also leave a space between the directive and its option to improve readability. If you are specifying this directive to the -C option of the Cob command line, you need to ensure that all characters are escaped correctly for the UNIX shell. See the section Option Configuration in the chapter COBOL System Interface (Cob) for details. For example, to specify ADDSYN on the command line:

cob -C 'addsyn "low" == "lowlight"' a.cbl

This directive does not appear in the list created with the SETTING directive.


ADV

Causes a control character to be inserted at the start of each line in a print file. This is for compatibility with mainframe operation.

Syntax:
 >>-.---.-.----.--ADV-----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOADV
Phase: Syntax check
$SET: Any
Dependencies:

ADV has no effect unless FILETYPE"11" is set.

See Also:

FILETYPE Compiler directive


ALIAS

Enables you to alias data-items.

Syntax:
 >>-.---.-.----.-ALIGN-----------------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOALIAS
Phase: Generate
$SET: Initial
Comments:

Using the SET ADDRESS OF statement you can access the same data in two different ways; that is, in the Working-Storage Section and as an item in the Linkage Section. This technique is known as "aliasing". Any program that uses aliasing must be compiled with ALIAS specified.


ALIGN

Specifies the memory boundaries on which data items of level-01 or level-77 are aligned.

Syntax:
 >>-.---.--ALIGN--"integer"-----------------><  
    .-/-+
Parameters:
integer The distance from the start of one level-01 to the start of the next is a multiple of this. Can take any value from 1 to 255.
Properties:
Default: ALIGN"8"
Phase: Syntax check
$SET: Initial
Dependencies:

Set to ALIGN"8" immediately by IBMCOMP or NORM.
Set to ALIGN"2" immediately by RM or RM"ANSI".

Comments:

Data items of level-01 are aligned on byte boundaries that are multiples of the value given.

This can help produce more efficient execution results but does mean more memory might be used.

Setting integer to a number that is not a multiple of four could impair the efficiency of the generated code.


ALPHASTART

Sets the number from which the Compiler counts positions in the collating sequence when compiling the ALPHABET clause.

Syntax:
 >>-.---.--ALPHASTART--"integer"------------><  
    .-/-+
Parameters:
integer The number to be used.
Properties:
Default: ALPHASTART"1"
Phase: Syntax check
$SET: Initial
Comments:

For ANSI conformance use ALPHASTART"1".

Example:

With ALPHASTART"1", the COBOL statement:

alphabet myalpha is 66, 67

declares an alphabet consisting of "A" and "B" since, counting from 1, these are the 66th and 67th characters in the ASCII collating sequence. With ALPHASTART"0", MYALPHA consists of "B" and "C".


ANIM

Makes the Compiler produce extra information so that you can debug your program using Animator.

Syntax:
 >>-.---.-.----.--ANIM----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOANIM
Phase: Both
$SET: Initial
Dependencies:

Set to ANIM immediately by WB.
Set to ANIM at end by BROWSE
Set to NOANIM at end by NOINT or RNIM.

Comments:

An intermediate code file is created, during the syntax check phase.

The intermediate code is held in a file with the filename extension .int. This can be animated. A file with the extension .idy is also created. This contains the additional information needed to animate the program.

The location of the .idy file is controlled by the COBIDY directive.

See Also:

COBIDY Compiler directive
OPT Compiler directive


ANS85

Specifies that words reserved in the ANSI'85 COBOL Standard are to be treated as reserved words, and changes the behavior of certain features to be compatible with that Standard.

Syntax:
 >>-.---.-.-------ANS85--"SYNTAX"--.--------><  
    .-/-+ ..----.-ANS85------------+ 
           .-NO-+
Parameters:
SYNTAX Makes the directive affect syntax only and not behavior.
Properties:
Default: ANS85
Phase: Syntax check
$SET: Initial
Dependencies:

Set to ANS85 at end by VSC2 or SAA.

Comments:

This directive causes the following behavior changes:


APOST

Makes the Compiler interpret the figurative constant QUOTE as the single-quote character (').

Syntax:
 >>-------APOST-----------------------------><
Parameters:

None

Properties:
Default: QUOTE
Phase: Syntax check
$SET: Any
Comments:

The opposite of this directive is the directive QUOTE which causes the double-quote character (") to be used.

See Also:

QUOTE Compiler directive


AREACHECK

Causes the Compiler to treat any token which starts in area A in the Procedure Division as a paragraph or section label, regardless of the preceding tokens.

Syntax:
 >>-.---.-.----.--AREACHECK-----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOAREACHECK
Phase: Syntax check
$SET: Any
Comments:

If AREACHECK is not specified, only tokens which follow a period are treated as possible labels. This directive provides closer compatibility with mainframe error handling, where omitting a period before the label produces a less serious message. We recommend that such erroneous source code is corrected.


ARITHMETIC

Specifies how arithmetic expressions are to be evaluated.

Syntax:
 >>-.---.--ARITHMETIC--"arith-type"---------><  
    .-/-+
Parameters:
arith-type The behavior to adopt.
Properties:
Default: ARITHMETIC"MF"
Phase: Syntax check
$SET: No
Comments:

The possible values of arith-type are:

OSVS Truncate according to the rules of OS/VS COBOL.
VSC2 Truncate according to the rules of VS COBOL II and COBOL/370.
MF Do not truncate intermediate results.

With ARITHMETIC"MF" specified, expressions are calculated as accurately as possible because no truncation takes place.


ASSIGN

Specifies how to assign a filename when neither EXTERNAL nor DYNAMIC appear in the SELECT statement.

Syntax:
 >>-.---.--ASSIGN--"assign-type"------------><  
    .-/-+
Parameters:
assign-type EXTERNAL or DYNAMIC. Defines the method.
Properties:
Default: ASSIGN"DYNAMIC"
Phase: Syntax check
$SET: Any
Comments:

For more details, see your File Handling book.

For any indexed files or for all files if the program is compiled using the CALLFH directive, filename mapping overrides any syntax definition or use of the ASSIGN directive.


ASSIGN-PRINTER

Specifies how to assign the output from an ASSIGN TO PRINTER clause when the clause does not specify a filename.

Syntax:
 >>-.---.-.-----ASSIGN-PRINTER.-"filename"-.-.--><  
    .-/-+ |                   .-()---------+ | 
          .-NO--ASSIGN-PRINTER---------------+
Parameters:
filename The file to be associated with the ASSIGN TO PRINTER clause.
Properties:
Default: NOASSIGN-PRINTER
Phase: Syntax check
$SET: Any
Comments:

This directive has no effect if you specify a filename as part of the ASSIGN TO PRINTER clause.

ASSIGN-PRINTER"filename" causes the output to be directed to the filename specified. The filename can be fully specified, including a path-name, base-name, and extension.

ASSIGN-PRINTER() results in the same behavior as including the following COBOL statement:

select filename-1 assign to printer filename-1

That is, the filename used in your COBOL program is also used as the filename for your output. If the internal filename is too long for your operating system to handle, it is truncated to the maximum length the operating system allows.

By default, the filename does not include an extension, but you can specify an extension by using the PRINT-EXT directive.

See Also:

PRINT-EXT Compiler directive


AUTOLOCK

Makes the default locking AUTOMATIC rather than EXCLUSIVE for files opened I-O or EXTEND in a multi-user environment.

Syntax:
 >>-.---.-.----.--AUTOLOCK------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOAUTOLOCK
Phase: Syntax check
$SET: Initial
Comments:

This directive does not appear in the SETTING list if its state is the same as WRITELOCK. In this case, the state of the two directives is indicated by the FILESHARE directive.

This directive is included for compatibility with earlier file-sharing products. When writing new programs you should use the locking syntax rather than this directive.


BELL

Makes the bell sound at points such as when compilation stops, either because of an error or because it has finished.

Syntax:
 >>-.---.-.----.--BELL----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOBELL
Phase: Syntax check
$SET: Initial

BOUND

Specifies that the subscript or index value is to be checked to ensure it is within the limits defined by the OCCURS clause.

Syntax:
 >>-.---.-.----.--BOUND---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: BOUND
Phase: Both
$SET: Initial
Dependencies:

BOUND sets NOBOUNDOPT at end.
Set to BOUND by CHECK.

Comments:

For multi-dimensional tables, only the composite subscript is checked. If any of the individual subscripts or indices is beyond its limit, but the reference remains within the table, no error is produced.


BOUNDOPT

Optimizes the code generated for USAGE DISPLAY subscripts.

Syntax:
 >>-.---.-.----.--BOUNDOPT------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: BOUNDOPT
Phase: Generate
$SET: Any
Dependencies:

Set to NOBOUNDOPT at end by BOUND.

Comments:

If BOUNDOPT is used, any digits in a USAGE DISPLAY subscript above the size of the table are ignored.

Can only be used when NOBOUND is specified. NOBOUNDOPT must be specified if a program references beyond the end of a table.

Example:

For a table with 50 entries, a PIC 9(3) subscript is treated as PIC 9(2), with the most significant digit ignored.


BRIEF

Makes the Compiler produce only error numbers and no message texts.

Syntax:
 >>-.---.-.----.--BRIEF---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOBRIEF
Phase: Syntax check
$SET: Any

BS2000

Ensures that words reserved under the Siemens BS2000 COBOL dialect are reserved words in this COBOL system, and changes the behavior of certain features to be compatible with that COBOL dialect.

Syntax:
 >>-.---.-.----.--BS2000-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOBS2000
Phase: Syntax check
$SET: Initial
See Also:

DIALECT Compiler directive


BWZSTAR

Determines whether the BLANK WHEN ZERO clause is allowed in the Data Division for those fields defined with the "*" PICTURE symbol.

Syntax:
 >>-.---.-.----.--BWZSTAR-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOBWZSTAR
Phase: Syntax check
$SET: Any
Comments:

If BWZSTAR is specified, the BLANK WHEN ZERO clause is allowed with fields defined using the "*" PICTURE symbol, and BLANK WHEN ZERO is effective when the field is the target of an editing operation and the result is zero. If NOBWZSTAR is specified, a BLANK WHEN ZERO clause associated with a PIC * field is rejected.


BYTE-MODE-MOVE

Controls behavior for overlapping data items.

Syntax:
 >>-.---.-.----.--BYTE-MODE-MOVE------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOBYTE-MODE-MOVE
Phase: Syntax check
$SET: Initial
Comments:

The Compiler also accepts the directive-name without hyphens; that is BYTEMODEMOVE.

This directive is provided for compatibility with IBM mainframe compilers in the handling of forward overlapping moves - that is, where the start of the target data item overlaps the end of the source data item.

If BYTE-MODE-MOVE is specified, data is moved one byte at a time from the source to the target.

If NOBYTE-MODE-MOVE is specified, the data is moved in granules of two, four or more bytes at a time (depending on environment) from the source to the target. Consequently, if the overlap is less than the size of the granule, each granule moved overwrites part of the next granule to be moved.


CALLADIS

Causes all Format 1 ACCEPT, DISPLAY and EXHIBIT statements to be routed through the specified handler.

Syntax:
 >>-.---.-.-------CALLADIS--"handler-name"-.--><  
    .-/-+ ..----.-CALLADIS-----------------+ 
           .-NO-+
Parameters:
handler-name Root-name of a program to be called to act as the handler.
Properties:
Default: NOCALLADIS
Phase: Syntax check
$SET: Initial
Comments:

If handler-name is not specified, EXTADIS is assumed.


CALLFH

Makes the Compiler generate direct calls for all file I/O operations, using the Callable File Handler interface.

Syntax:
 >>-.---.--------CALLFH--"handler-name"-.--><  
    .-/-+ 
Parameters:
handler-name Root-name of a program to be called to act as the File Handler.
Properties:
Default: CALLFH"EXTFH"
Phase: Syntax check
$SET: Initial
Comments:

handler-name can be one of the following:

EXTFH The File Handler supplied with this COBOL system
FHREDIR For use with Fileshare Version 2
Your own file handler

When CALLFH is specified, all file I/O statements are converted to calls to the file handler specified by the directive.

If handler-name is not specified, the module Extfh is assumed.

This directive is also used to direct all file handling calls through converter modules, to make use of non-COBOL file handlers.

Use this directive to make your programs call your file handler instead of the standard File Handler.


CALLMCS

This directive is reserved for internal use by this COBOL system. Because it might appear in the list of settings, it is included for completeness. It is not intended for your use, and its setting should not be changed.

Causes all Message Control System operations to be routed through the specified handler.

Syntax:
 >>-.---.-.-------CALLMCS--"mcs-name"-.-----><  
    .-/-+ ..----.-CALLMCS-------------+ 
           .-NO-+
Parameters:
mcs-name Root-name of a program to be called to process message control system (mcs) operations.
Properties:
Default: NOCALLMCS
Phase: Syntax check
$SET: Initial
Comments:

If handler-name is not specified, EXTMCS is assumed.


CALLSORT

Defines the program to be called to handle all SORT and MERGE operations.

Syntax:
>>-.---.-------CALLSORT--"sort-name"-.---><  
   .-/-+
Parameters:
sort-name Root-name of a program to be called to process sorts and merges.
Properties:
Default: CALLSORT"EXTSM"
Phase: Syntax check
$SET: Initial

CANCELLBR

Makes the Compiler close an .lbr file used as a library in a COPY statement once that copy operation is complete.

Syntax:
 >>-.---.-.----.--CANCELLBR-----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: CANCELLBR
Phase: Syntax check
$SET: Any
Comments:

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 statement. Only .lbr libraries referenced in COPY statements after the $SET statement are affected. Any left open from previous COPY statements are only closed if specified again on a COPY statement following a CANCELLBR directive.


CASE

Prevents external symbols (such as Program-ID and names of called programs) being converted to upper case.

Syntax:
 >>-.---.-.----.--CASE----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOCASE
Phase: Generate
Environment: All
$SET: Any
Comments:

This is useful if you are calling a program written in C, where names are case dependent.


CHANGE-MESSAGE

Changes the severity of error messages. Messages can also be suppressed or returned to their original severity.

Syntax:
                               +-------------. 
                               v             | 
 >>-.---.-.-----CHANGE-MESSAGE--"error svrty"-.->< 
    .-/-+ .-NO--CHANGE-MESSAGE----------------+
Parameters:
error Number of message to be changed or ALL meaning all messages.
svrty New severity :
S Serious
E Error
W Warning
I Informational
N Do not produce this message
R Reset to normal severity
Properties:
Default: NOCHANGE-MESSAGE
Phase: Syntax check
$SET: Any
Dependencies:

CHANGE-MESSAGE overrides the general settings of directives such as FLAGAS.

Comments:

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 CHANGE-MESSAGE directive or the FLAGAS or FLAGCD directives.

Examples:
CHANGE-MESSAGE"ALL R" 
CHANGE-MESSAGE"10 S 135 E 100 N"
See Also:

FLAGAS Compiler directive
FLAGCD Compiler directive
HIDE-MESSAGE Compiler directive


CHARSET

Defines the character set of the environment.

Syntax:
 >>-.---.--CHARSET--"char-set"--------------><  
    .-/-+
Parameters:
char-set ASCII or EBCDIC.
Properties:
Default: CHARSET"ASCII"
Phase: Syntax check
$SET: Initial
Dependencies:

CHARSET"ASCII" sets DEFAULTBYTE"32", SIGN"ASCII" and NATIVE"ASCII" immediately.
CHARSET"EBCDIC" sets DEFAULTBYTE"0" immediately and SIGN"EBCDIC" and NATIVE"EBCDIC" at end.

Comments:

All literals and collating sequences are handled in the character set specified.

For current limitations see your Programmer's Guide to Writing Programs.

With CHARSET"EBCDIC" set, COBOL system library routines that receive or return alphanumeric data in any parameters do not work. The alphanumeric data must be in ASCII.


CHECK

Turns on all run-time checks in generated code

Syntax:
>>--.----.---CHECK------------------><
    .-NO-+
Parameters:

None

Properties:
Default: None
Phase: Generate
$SET: Initial
Dependencies:

CHECK sets BOUND, LINKCHECK, and PARAMCOUNTCHECK immediately
NOCHECK sets NOBOUND, NOLINKCHECK, and NOPARAMCOUNTCHECK immediately

Comments:

CHECK turns on all run-time checks in generated code. The run-time checks include checks for:

NOCHECK turns off all run-time checks in generated code.


CHECKDIV

Controls the behavior of your program if it tries to divide by zero in a statement that has no ON SIZE ERROR phrase.

Syntax:
 >>-.---.-.-------CHECKDIV--"dialect"-.-----><  
    .-/-+ ..----.-CHECKDIV------------+ 
           .-NO-+
Parameters:
dialect Must be ANSI, OSVS, VSC2, or COBOL370.
Properties:
Default: CHECKDIV"ANSI"
Phase: Syntax check
$SET: Initial
Comments:

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 048 (Attempt to divide by zero). This error can be disabled using the -O run-time system switch.

This directive has no effect on arithmetic statements that use the ON SIZE ERROR phrase.

See Also:

O run-time switch


CHECKNUM

Checks whether numeric fields contain valid data before performing operations on them.

Syntax:
 >>-.---.-.----.--CHECKNUM------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOCHECKNUM
Phase: Generate
$SET: Initial
Comments:

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") is displayed if any numeric field is found to contain nonnumeric data. This error can be disabled using the -F run-time system 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 run-time switch


CICS

Enables the use of CICS by updating BLL cells.

Syntax:
 >>-.---.-.----.--CICS----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOCICS
Phase: Syntax check
$SET: No
Comments:

This directive is reserved for use with add-on CICS products supplied by us. 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:

     COPY "CICS.CPY"

at the beginning of your Linkage Section. If your program has no Linkage Section, the Compiler inserts one as follows:

 LINKAGE SECTION. 
 COPY "CICS.CPY". 
 01 DFHCOMMAREA  PIC X(n).

where the parameters are:

CICS.CPY Contains a definition of the CICS EXEC INTERFACE BLOCK and DLI INTERFACE BLOCK compatible with Version 1, Release 6 (or earlier) of CICS.
n Takes one of the following values:
1 There is no DFHCOMMAREA
>1 There is a DFHCOMMAREA.

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.


CICS-CPY

Inserts the statement COPY "CICS.CPY" provided the CICS directive is specified.

Syntax:
 >>-.---.-.----.--CICS-CPY------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: CICS-CPY
Phase: Syntax check
$SET: No
Comments:

This directive is reserved for use with add-on CICS products supplied by us. 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


CICSOPTIMIZE

Optimizes the handling of CICS BLL cells.

Syntax:
 >>-.---.-.----.-.-CICSOPT------.-----------><  
    .-/-+ .-NO-+ .-CICSOPTIMISE-+
                 .-CICSOPTIMIZE-+
Parameters:

None

Properties:
Default: NOCICSOPTIMIZE
Phase: Syntax check
$SET: No
Comments:

This directive is reserved for use with add-on CICS products supplied by us. 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.


CMPR2

Provides 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.

Syntax:
 >>-.---.-.----.--CMPR2---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOCMPR2
Phase: Syntax check
$SET: Initial
Dependencies:

Requires VSC2"3", VSC2"4" or COBOL370 flagging to be selected.

Comments:

A conflicting directives message is issued (with FLAGCD only) if one of the required flagging levels is not selected.

Setting this directive is not 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 the CMPR2 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


COBFSTATCONV

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.

Syntax:
 >>-.---.-.----.--COBFSTATCONV--------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOCOBFSTATCONV
Phase: Syntax check
$SET: Initial

COBIDY

Specifies the path where the Animator information file (.idy file) and COBOL Source Information file (.csi) are to be written.

Syntax:
 >>-.---.-.-------COBIDY--"pathname"-.-----><  
    .-/-+ ..----.-COBIDY-------------+ 
           .-NO-+
Parameters:
pathname Path specification.
Properties:
Default: NOCOBIDY
Phase: Syntax check
$SET: No
Comments:

If you do not specify pathname, the pathname in the COBIDY environment variable is used; if the environment variable contains multiple path-names the first of them is used. With NOCOBIDY, the .idy files are written to the same path as the object program.


COBOL370

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.

Syntax:
 >>-.---.-.-------COBOL370--"integer"-.-----><  
    .-/-+ ..----.-COBOL370------------+ 
           .-NO-+
Parameters:
integer 1 or 2. The level of IBM COBOL/370 to be compatible with.
Properties:
Default: NOCOBOL370
Phase: Syntax check
$SET: Initial
Dependencies:

COBOL370 sets DBSPACE and DBCS"3" immediately.

Comments:

Setting integer to:

1 Specifies compatibility with Version 1 Release 1 of IBM COBOL/370
2 Specifies compatibility with Version 1 Release 2 of IBM COBOL for MVS and VM

Specifying COBOL370 without a parameter is the same as specifying COBOL370"2".


COBOLDIR

Specifies whether the Compiler should process the directives in a cobol.dir file or ignore it.

Syntax:
 >>-.---.-.----.--COBOLDIR------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: COBOLDIR
Phase: Syntax check
$SET: No

COMP

Makes the Compiler produce very compact and efficient code for some statements involving COMP data items, by treating COMP items as COMP-X.

Syntax:
 >>-.---.-.----.--COMP----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOCOMP
Phase: Syntax check
$SET: Initial
Comments:

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.


COMP-5

Specifies whether the sign is to be dropped when a value is stored in an unsigned COMP-5 data item.

Syntax:
 >>-.---.--COMP-5--"integer"----------------><  
    .-/-+
Parameters:
integer Must be 1 or 2.
Properties:
Default: COMP-5"2"
Phase: Syntax check
$SET: Initial
Comments:

The possible values of integer are:

1 Behavior as in earlier versions of this Compiler. The sign is dropped.
2 The sign is not dropped. Negative numbers are stored in two's complement form, so that, except for their byte-order being machine-dependent, unsigned COMP-5 items behave like COMP-X. This results in highly efficient arithmetic on unsigned COMP-5 items.

COMP-6

Specifies whether COMP-6 data is to be held in binary or packed decimal format.

Syntax:
 >>-.---.--COMP-6--"integer"----------------><  
    .-/-+
Parameters:
integer Must be 1 or 2.
Properties:
Default: COMP-6"2"
Phase: Syntax check
$SET: Initial
Dependencies:

RM or MF must be set.
RM and RM"ANSI" set COMP-6"1".
NORM sets COMP-6"2".

Comments:

The possible values of integer are:

1 A binary format is used for COMP-6 data, as described in the chapter Ryan McFarland COBOL V2.0 Syntax Support in your Language Reference - Additional Topics.
2 Packed decimal format is used. If the item is signed, the format is identical to COMP-3. If the item is unsigned, no sign field is present.

Even if you specify the COMP-6 directive, the reserved word COMP-6 is recognized only if it belongs to the dialect specified by RM or MF"10".

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"


COMS85

Allows your program to contain syntax introduced in the Communications Module of the ANSI'85 COBOL Standard.

Syntax:
 >>-.---.-.----.--COMS85--------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOCOMS85
Phase: Syntax check
$SET: Initial

CONFIRM

Makes the Compiler echo all subsequent directives to the screen.

Syntax:
 >>-.---.-.----.--CONFIRM--------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOCONFIRM
Phase: Both
$SET: No
Dependencies:

Set to CONFIRM immediately by VERBOSE.


CONSTANT

Declares a constant for use in the program.

Syntax:
 >>-.---.-CONSTANT-const-name-.-(numeric-lit)--.-><  
    .-/-+                     .-"alphanum-lit"-+
Parameters:
const-name Data-name. The constant's name.
numeric-lit Numeric literal. The constant's value. Must be zero or a positive integer.
alphanum-lit Alphanumeric literal. The constant's value.
Properties:
Default: Not set
Phase: Syntax check
$SET: Any
Comments:

The effect is as if the constant const-name had been defined in the program in a level-78. Its value is that given in the parentheses or quotation marks. If parentheses are used, the constant is of category numeric; if quotation marks are used it is of category alphanumeric.

To declare several figurative constants using this feature, use the CONSTANT directive repeatedly.


CONVERTRET

Causes COMP and COMP-X items specified in CALL ... RETURNING and EXIT PROGRAM ... RETURNING phrases to be converted to COMP-5.

Syntax:
 >>-.---.-.----.--CONVERTRET----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOCONVERTRET
Phase: Syntax check
$SET: Initial

CONVSPACE

Converts double-byte space characters in COBOL source files to single-byte spaces on input.

Syntax:
 >>-.---.-.----.--CONVSPACE-----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: CONVSPACE
Phase: Syntax check
$SET: Initial
Comments:

CONVSPACE only has an effect when the DBSPACE Compiler directive is off.


COPYEXT

Specifies the filename extension of the copyfile that the Compiler is to look for if a filename in a COPY statement is specified without an extension.

Syntax:
                              +-------------. 
                              v             | 
 >>-.---.--COPYEXT-"extension-.-------------.-"--><  
    .-/-+                     .-,-extension-+
Parameters:
extension A filename extension.
Properties:
Default: COPYEXT",cbl,cpy"
Phase: Syntax check
$SET: Initial
Comments:

Up to eight extensions can be specified, each extension being up to 10 characters long. A null extension is used to represent an extension of spaces; for example:

COPYEXT"src,,txt"

would first look for files with the extension .src, then for files with no extension, and then for files with the extension .txt.

If the filename specified in a COPY statement has no extension or trailing period then a list of possible extensions are tried in turn until a file is successfully found or the list is exhausted (and an error reported).

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 your copyfiles have the filename extension .cpy, specifying COPYEXT"CPY.CBL" would avoid unnecessary file access attempts.


COPYLBR

Makes the Compiler treat the library specified in a COPY statement as an .lbr file.

Syntax:
 >>-.---.-.----.--COPYLBR-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOCOPYLBR
Phase: Syntax check
$SET: No
Comments:

With NOCOPYLBR, the Compiler assumes that the library is a path-name.


COPYLIST

Makes the Compiler list the contents of files named in COPY statements.

Syntax:
 >>-.---.-.----.--COPYLIST-.-----------.----><  
    .-/-+ .-NO-+           .-"integer"-+
Parameters:
integer Must be 0 or between 50 and 99.
Properties:
Default: COPYLIST
Phase: Syntax check
$SET: Any
Comments:

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.


CURRENCY-SIGN

Specifies the currency sign to be recognized in the PICTURE clause.

Syntax:
 >>-.---.--CURRENCY-SIGN--"integer"---------><  
    .-/-+
Parameters:
integer ASCII code of the character, in decimal.
Properties:
Default: CURRENCY-SIGN"36" (that is, "$")
Phase: Syntax check
$SET: Initial
Comments:

You cannot specify a valid PICTURE clause symbol. See your Language Reference for a list of these.


CURRENT-DATE

Specifies the format of the date stored in the CURRENT-DATE special register.

Syntax:
 >>-.---.--CURRENT-DATE--"date-format"------><  
    .-/-+
Parameters:
date-format Either DDMMYYYY or MMDDYYYY.
Properties:
Default: CURRENT-DATE"MMDDYYYY"
Phase: Syntax check
$SET: Any
Comments:

DDMMYYYY causes CURRENT-DATE to be stored in European format. The parameter can be specified in either upper case or lower case.


DATACOMPRESS

Specifies the type of data compression to be done on sequential and indexed files.

Syntax:
 >>-.---.-.-----DATACOMPRESS--"integer"-.---><  
    .-/-+ .-NO--DATACOMPRESS------------+
Parameters:
integer Must be one of:
0 Equivalent to NODATACOMPRESS
1 Specifies run-length encoding
3 Specifies run-length encoding for double-byte (DBCS) characters
128 through 255 User-defined compression routines
Properties:
Default: NODATACOMPRESS
Phase: Syntax check
$SET: Any
Comments:

The only values that can be specified for data compression for the File Handler are 1 and 3. Values in the range 128 through 255 indicate user-defined compression routines for user-defined file handlers..

You need to specify data compression only when creating the file. Subsequently, the data compression is detected when the file is opened.

To get data compression on an individual file, use $SET statements in your source so that this directive is in effect only for the part of the source containing the file's SELECT statement.

Data compression is supported only by the Callable File Handler. All indexed files are processed by the Callable File Handler. If you want to use data compression with sequential files, every program referencing those files must be compiled with the directive CALLFH"EXTFH".

See Also:

CALLFH Compiler directive


DATAMAP

Causes the Compiler to output information on data items.

Syntax:
 >>-.---.-.----.--DATAMAP-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NODATAMAP
Phase: Syntax check
$SET: Initial
Dependencies:

None.

Comments:

This directive causes the check phase of the Compiler to output information on the data items; both those that you have specified, and those automatically generated by the Compiler, such as the data area for the RETURN-CODE special register

The information is output at the end of the list file. The information on the data items is output in the same order as they are encountered in your program by the Compiler. The first line is the program-id of the program to which the data items belong. This enables you to see the relevant data items for nested programs, or for the various areas of OO class programs (classes, object methods, and so on). For each data item, the following information is listed:


DATE

Puts the date in the Date-Compiled paragraph and at the top of each page of the listing.

Syntax:
 >>-.---.-.-------DATE--"string"-.----------><  
    .-/-+ ..----.-DATE-----------+ 
           .-NO-+
Parameters:
string An alphanumeric literal.
Properties:
Default: DATE
Phase: Syntax check
$SET: No
Comments:

The date and time, available from the operating system, are automatically inserted when you specify DATE. You can, however, enter the date yourself as the parameter. With NODATE, the paragraph is left unaltered.

With DATE, the operating system date or the string you enter appears at the top of each page of the listing. With NODATE, spaces are used instead.


DB2

Causes EXEC SQL statements in your program to be replaced with DB2 Universal Database API calls.

Syntax:
 >>-.---.-.----DB2-.----------------------.-.--><  
    .-/-+ |        |   +-----.---.-----.  | | 
          |        |   |     .-,-+     |  | | 
          |        |   v               |  | | 
          |        .-(.-option=setting-.)-+ | 
          |           |                |    | 
          |           .-NO-option------+    | 
          .-NO-DB2--------------------------+
Parameters:
option One of the DB2 options (see below)
setting The setting for the option
Properties:
Default: NODB2
Phase: Syntax check
$SET: Initial
Comments:

To use this directive you need to have the DB2 UDB Software Development Kit (v6.1 or earlier) or DB2 UDB Application Development Client (v7.1 or later) installed, or a compile error will result. For more information on using the DB2 directive, including the options and their settings, see the chapter DB2 in your Database Access book.


DBCHECK

Makes the Compiler check that any double-byte character set (DBCS) literals only contain valid 16-bit DBCS characters.

Syntax:
 >>-.---.-.----.--DBCHECK-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NODBCHECK
Phase: Syntax check
$SET: Initial
Comments:

If you specify DBCHECK in environments that support validation of DBCS data, any literal that does not contain only valid 16-bit DBCS characters results in syntax error 1048 (DBCS literal includes invalid data).


DBCS

Makes the Compiler accept characters of the double-byte character set (DBCS) for use in ideographic languages such as Japanese, Chinese and Korean.

Syntax:
 >>-.---.-.-------DBCS--"integer"-.---------><  
    .-/-+ ..----.-DBCS------------+ 
           .-NO-+
Parameters:
integer Must be 1, 2 or 3. Indicates which compatibility is required.
Properties:
Default: NODBCS
Phase: Syntax check
$SET: Initial
Dependencies:

Set to DBCS"2" immediately by SAA, VSC2"2", VSC2"3" or MF"7".
Set to DBCS"3" immediately by COBOL370 or MF"integer" where integer > 7.

Comments:

The possible values of integer are:

1 Behavior as in earlier versions of this Compiler.
2 Provides full System Application Architecture (SAA) DBCS support. This directive sets DBSPACE.
3 Includes DBCS support as in IBM COBOL/370. This includes the use of PIC N, PIC G, and DBCS literals specified with "delimiter N".

DBCSSOSI

Defines the two characters used as the shift-out and shift-in delimiters in DBCS literals.

Syntax:
 >>-.---.-.----DBCSSOSI-"integer-1"-"integer-2"-.--><  
    .-/-+ .-NO-DBCSSOSI-------------------------+
Parameters:
integer-1 ASCII code of the shift-out character, in decimal.
integer-2 ASCII code of the shift-in character, in decimal.
Properties:
Default: NODBCSSOSI
Phase: Syntax check
$SET: Any
Comments:

When shift-out and shift-in characters are specified by this directive, every DBCS literal must have the shift-out character immediately after the opening quotation mark and the shift-in character immediately before the closing quotation mark. They act as additional delimiters to the literal, and are not part of its value. With NODBCSSOSI, no shift-out and shift-in characters are needed or recognized.


DBSPACE

Makes the Compiler interpret the figurative constant SPACE, when used as a DBCS figurative constant, as the double-byte space character supplied by the system.

Syntax:
 >>-.---.-.----.--DBSPACE-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: Depends on the setting of MF"integer". If integer is greater than 7, the default is DBSPACE. Otherwise, it is NODBSPACE.
Phase: Syntax check
$SET: Any
Dependencies:

DBSPACE set immediately by COBOL370, NCHAR"2", SAA, VSC2"2" or VSC2"3".
DBSPACE set immediately by MF"integer" where integer > 7

Comments:

With DBSPACE, the Compiler uses the system-supplied double-byte space character. NODBSPACE provides compatibility with previous versions of this Compiler, where the double-byte space character was two ASCII space characters (x"2020").


DE-EDIT

Specifies the behavior of de-editing moves from numeric-edited items to other numeric-edited items or to numeric items.

Syntax:
 >>-.---.--DE-EDIT--"integer"---------------><  
    .-/-+
Parameters:
integer Must be 1 or 2. Indicates which compatibility required.
Properties:
Default: DE-EDIT"2"
Phase: Syntax check
$SET: Any
Comments:

The possible values of integer are:

1 Behavior as in earlier versions of this Compiler. Ignores the PICTURE clause of the sending field.
2 De-edits according to the PICTURE clause of the sending field. This provides ANSI'85 conformance.
Example:
 01 a  pic 909V99 value "30456". 
 01 b  pic 9(5). 
        ... 
     move a to b

With DE-EDIT"1", b contains 30456. With DE-EDIT"2", b contains 00034; the 0 after the 3 is dropped because it corresponds to the insertion character 0 in the picture-string of a, and the .56 is dropped because B has no decimal places.


DEFAULTBYTE

Initializes each otherwise undefined byte of the Data Division to the character given.

Syntax:
 >>-.---.--DEFAULTBYTE--"integer"-----------><  
    .-/-+
Parameters:
integer ASCII code of the character, in decimal.
Properties:
Default: DEFAULTBYTE"32"
Phase: Syntax check
$SET: Initial
Dependencies:

Set to DEFAULTBYTE"32" immediately by CHARSET"ASCII".
Set to DEFAULTBYTE"0" immediately by CHARSET"EBCDIC", MS, IBM-MS or PC1.

Comments:

integer is a decimal value. For example, if you want to specify an EBCDIC space use DEFAULTBYTE"64"; to specify an ASCII space use DEFAULTBYTE"32".


DEFAULTCALLS

Specifies the default calling convention.

Syntax:
 >>-.---.-.-------DEFAULTCALLS--"integer"-.-><  
    .-/-+ ..----.-DEFAULTCALLS------------+ 
           .-NO-+
Parameters:
integer Default calling convention
Properties:
Default: NODEFAULTCALLS
Phase: Syntax check
$SET: Any
Comments:

DEFAULTCALLS without the optional parameter specifies that the calling convention specified in the PROCEDURE DIVISION USING statement is to be used as the default calling convention.

DEFAULTCALLS"integer" specifies that the calling convention indicated by "integer" is to be used as the default calling convention.

NODEFAULTCALLS is equivalent to DEFAULTCALLS"0".

Individual CALL statements can override these defaults (see your Language Reference). See the section Call Conventions in the chapter The COBOL Interfacing Environment in your Programmer's Guide to Writing Programs for a list of available calling conventions.


DETECT-LOCK

Makes READ statements detect when a record is locked by another program.

Syntax:
 >>-.---.-.----.--DETECT-LOCK---------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: DETECT-LOCK
Phase: Syntax check
$SET: Initial
Comments:

The Compiler also accepts the name without a hyphen; that is DETECTLOCK

With DETECT-LOCK, if a READ statement reads a record locked by another program, it returns an I/O status of 9/068. With NODETECT-LOCK, it returns 0/000. In both cases it reads the record successfully.

If a READ statement attempts to lock a record (that is, if the statement LOCK MODE IS AUTOMATIC has been specified, or a WITH LOCK phrase is used on the READ statement), and the record is locked by another program, an I/O status of 9/068 is returned. If NODETECT-LOCK is specified, and the READ statement is not attempting to lock a record an I/O status of 0/000 is returned.


DG

Changes the behavior of certain features to be compatible with Data General Interactive COBOL rev 1.30.

Syntax:
 >>-.---.-.----.--DG------------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NODG
Phase: Syntax check
$SET: Initial
Comments:

See your Language Reference - Additional Topics for details of syntax support for Data General Interactive COBOL rev 1.30.


DIALECT

Enables check-time and run-time behavior consistent with the specified dialect.

Syntax:
>>----------DIALECT"dialect"-------><
Parameters:

dialect

A dialect. See Comments below.

Dependencies:

Depending on the setting of dialect, various other Compiler directives are set by default. See Comments below.

Properties:
Default: DIALECT"ANS85"
$SET: Initial
Comments:

There is no explicit NODIALECT setting. DIALECT(dialect) is equivalent to USE(WBdialect.dir) in other Micro Focus COBOL systems.

dialect can be:

ANS85
BS2000
BS2000-OFFLOAD
COBOL370
DOSVS
ISO2000
MF
OSVS
SAA1
SAA2
VSC21
VSC22
VSC23
VSC24

If you set DIALECT to any of these values, various other Compiler directives are set. These are shown below.



DIALECT"ANS85"

DIALECT"BS2000" and "BS2000-OFFLOAD"


DIALECT"ISO2000"
ALIGN"8" ALIGN"8" ALIGN"8"
ALPHASTART"1" ALPHASTART"1" ALPHASTART"1"
ALTER ALTER ALTER
ANS85 NOANS85 NOANS85
ARITHMETIC"MF" ARITHMETIC"MF" ARITHMETIC"MF"
ASSIGN”EXTERNAL"
NOBS2000 BS2000 (for DIALECT"BS2000")
BS2000-OFFLOAD (for DIALECT"BS2000-OFFLOAD")
NOBS2000
CALLFH CALLFH CALLFH
CALLSORT"EXTSM" CALLSORT"EXTSM" CALLSORT"EXTSM"
CANCELLBR CANCELLBR CANCELLBR
CHARSET"ASCII" CHARSET"EBCDIC" (for DIALECT"BS2000")
CHARSET(ASCII) (for DIALECT"BS2000-OFFLOAD")
CHARSET"ASCII"
CHECKDIV"ANSI" CHECKDIV"ANSI" CHECKDIV"ANSI"
COMS85 NOCOMS85 NOCOMS85
COPYEXT"cbl,CPY," COPYEXT"cbl,CPY," COPYEXT"cbl,CPY,"
COPYLBR NOCOPYLBR COPYLBR
CURRENT-DATE"MMDDYYYY" CURRENT-DATE"MMDDYYYY" CURRENT-DATE"MMDDYYYY"
NODBCHECK NODBCHECK NODBCHECK
NODBCS NODBCS NODBCS
NODBCSOSSI NODBCSOSSI NODBCSOSSI
NODBSPACE NODBSPACE NODBSPACE
DE-EDIT"2" DE-EDIT"2" DE-EDIT"2"
DEFAULTBYTE"32" DEFAULTBYTE"0" DEFAULTBYTE"32"
NODG NODG NODG
DYNAM DYNAM DYNAM
ECHO ECHO ECHO
NOEXTINDEX NOEXTINDEX NOEXTINDEX
NOFDCLEAR NOFDCLEAR NOFDCLEAR
NOFLAG FLAG"BS2000" FLAG"ISO2000"
NOFLAGAS FLAGAS"S" NOFLAGAS
FLAGCD"w" FLAGCD"w" FLAGCD"w"
NOFLAGMIG NOFLAGMIG NOFLAGMIG
FLAGSTD"H C2 D2 S2 R O" NOFLAGSTD NOFLAGSTD
FOLDCALLNAME"UPPER" FOLDCALLNAME"UPPER" FOLDCALLNAME"UPPER"
FOLDCOPYNAME"UPPER" FOLDCOPYNAME"UPPER" FOLDCOPYNAME"UPPER"
NOHOSTNUMCOMPARE NOHOSTNUMCOMPARE NOHOSTNUMCOMPARE
NOHOSTNUMMOVE NOHOSTNUMMOVE NOHOSTNUMMOVE
NOIBM-MS NOIBM-MS NOIBM-MS
INFORETURN"U" INFORETURN"U" INFORETURN"U"
INTLEVEL"2" INTLEVEL"4" INTLEVEL"4"
IOCONV IOCONV IOCONV
NOISO2000 ISO2000 ISO2000
NOLIBRARIAN NOLIBRARIAN NOLIBRARIAN
NOMAPNAME NOMAPNAME NOMAPNAME
NOMF NOMF NOMF
NOMFCOMMENT NOMFCOMMENT NOMFCOMMENT
NOMS NOMS NOMS
NOODOSLIDE ODOSLIDE NOODOSLIDE
NOOLDCOPY NOOLDCOPY NOOLDCOPY
NOOLDINDEX NOOLDINDEX NOOLDINDEX
NOOLDNEXTSENTENCE NOOLDNEXTSENTENCE NOOLDNEXTSENTENCE
NOOLDREADINTO NOOLDREADINTO NOOLDREADINTO
NOOLDSTRSUB NOOLDSTRSUB NOOLDSTRSUB
NOOPTIONAL-FILE NOOPTIONAL-FILE NOOPTIONAL-FILE
NOPC1 NOPC1 NOPC1
PERFORM-TYPE"MF" PERFORM-TYPE"MF" PERFORM-TYPE"MF"
NOPROGID-COMMENT NOPROGID-COMMENT NOPROGID-COMMENT
NOPROTECT-LINKAGE NOPROTECT-LINKAGE NOPROTECT-LINKAGE
QUAL QUAL QUAL
QUALPROC QUALPROC QUALPROC
QUOTE QUOTE QUOTE
NORDW NORDW NORDW
RECMODE"F" RECMODE"F" RECMODE"F"
REMAINDER"1" REMAINDER"1" REMAINDER"1"
NORESEQ NORESEQ NORESEQ
NORM NORM NORM
RTNCODESIZE"4"
NOSEQCHK NOSEQCHK NOSEQCHK
SOURCEFORMAT"FIXED" SOURCEFORMAT"FIXED" SOURCEFORMAT"FIXED"
NOSPZERO NOSPZERO NOSPZERO
NOSTICKY-LINKAGE NOSTICKY-LINKAGE NOSTICKY-LINKAGE
NOSTICKY-PERFORM NOSTICKY-PERFORM NOSTICKY-PERFORM
SWITCH-TYPE"3" (for DIALECT"BS2000")
SWITCH-TYPE"2" (for DIALECT"BS2000-OFFLOAD")
SYMBSTART"1" SYMBSTART"1" SYMBSTART"1"
TRUNC"ANSI" TRUNC TRUNC"ANSI"
NOTRUNCCOPY NOTRUNCCOPY NOTRUNCCOPY
WARNING"3" WARNING"3" WARNING"3"
NOXOPEN NOXOPEN NOXOPEN
ZEROLENGTHFALSE ZEROLENGTHFALSE ZEROLENGTHFALSE
NOZEROSEQ NOZEROSEQ NOZEROSEQ
NOZWB NOZWB NOZWB

DIALECT"VSC24"and DIALECT"VSC23"

DIALECT"VSC22" and DIALECT"VSC21"
NOANSI85
APOST APOST
AREACHECK AREACHECK
ARITHMETIC"VSC2" ARITHMETIC"VSC2"
ASSIGN"EXTERNAL" ASSIGN"EXTERNAL"
NOBOUND NOBOUND
BYTEMODEMOVE BYTEMODEMOVE
CHARSET"EBCDIC" CHARSET"EBCDIC"
CHECKDIV"VSC2" CHECKDIV"VSC2"
COBFSTATCONV COBFSTATCONV
NOCOBOLDIR NOCOBOLDIR
COMP
COMS85 COMS85
COPYEXT"CPY,CBL" COPYEXT"CPY,CBL"
COPYLBR DBCS"2" COPYLBR DBCS"2"
DBCSSOSI"14""15" DBCSSOSI"14""15"
DEFAULTBYTE"0" DEFAULTBYTE"0"
NODYNAM NODYNAM
FDCLEAR FDCLEAR
FLAG"VSC2" FLAG"VSC2"
NOFLAGAS"S" NOFLAGAS"S"
FLAGCD"W" FLAGCD"W"
FOLDCALLNAME"UPPER" FOLDCALLNAME"UPPER"
FOLDCOPYNAME"UPPER" FOLDCOPYNAME"UPPER"
FP-ROUNDING"VSC2" FP-ROUNDING"VSC2"
HOST-NUMCOMPARE"1" HOST-NUMCOMPARE"1"
IBMCOMP IBMCOMP
INDD"SYSIN 80 L A" INDD"SYSIN 80 L A"
MAPNAME MAPNAME
NOMF NOMF
NOMFCOMMENT NOMFCOMMENT
NATIVE"EBCDIC" NATIVE"EBCDIC"
ODOSLIDE ODOSLIDE
NOOPTIONAL-FILE NOOPTIONAL-FILE
OUTDD"SYSOUT 132 L A" OUTDD"SYSOUT 132 L A"
PERFORM-TYPE"VSC2" PERFORM-TYPE"VSC2"
NOQUOTE NOQUOTE
RECMODE"VSC2" RECMODE"OSVS"
RTNCODE-SIZE"2" RTNCODE-SIZE"2"
NOSEG NOSEG
SIGN"EBCDIC" SIGN"EBCDIC"
STICKY-LINKAGE"2" STICKY-LINKAGE"2"
STICKY-PERFORM
NOTERMPAGE
NOTRUNC NOTRUNC
TRUNCCOPY"8" TRUNCCOPY"8"
VSC2"4" (for VSC24)
VSC2"3" (for VSC23)
VSC2"2" (for VSC22)
VSC2"1" (for VSC21)
WARNING"3" WARNING"3"
ZEROLENGTHFALSE ZEROLENGTHFALSE
ZWB ZWB

DIALECT"OSVS"

DIALECT"DOSVS"

DIALECT"COBOL370"
NOANS85 NOANS85
APOST APOST APOST
AREACHECK AREACHECK AREACHECK
ARITHMETIC"OSVS" ARITHMETIC"OSVS" ARITHMETIC"VSC2"
ASSIGN"EXTERNAL" ASSIGN"EXTERNAL" ASSIGN"EXTERNAL"
NOBOUND NOBOUND NOBOUND
BYTEMODEMOVE BYTEMODEMOVE BYTEMODEMOVE
CHARSET"EBCDIC" CHARSET"EBCDIC" CHARSET"EBCDIC"
CHECKDIV"OSVS" CHECKDIV"OSVS" CHECKDIV"COBOL370"
COBFSTATCONV COBFSTATCONV COBFSTATCONV
COBOL370"2"
NOCOBOLDIR NOCOBOLDIR NOCOBOLDIR
COMS85
COPYEXT"CPY,CBL" COPYEXT"CPY,CBL" COPYEXT"CPY,CBL"
COPYLBR COPYLBR COPYLBR
NODBCHECK NODBCHECK
NODBCS NODBCS
DBCSSOSI"14""15"
NODBSPACE NODBSPACE
DEFAULTBYTE"0" DEFAULTBYTE"0" DEFAULTBYTE"0"
DOSVS
NODYNAM NODYNAM NODYNAM
FDCLEAR FDCLEAR FDCLEAR
FLAG"OSVS" FLAG"DOSVS" FLAG"COBOL370"
NOFLAGAS"S" NOFLAGAS"S" NOFLAGAS"S"
FLAGCD"W" FLAGCD"W" FLAGCD"W"
FOLDCALLNAME"UPPER" FOLDCALLNAME"UPPER" FOLDCALLNAME"UPPER"
FOLDCOPYNAME"UPPER" FOLDCOPYNAME"UPPER" FOLDCOPYNAME"UPPER"
FP-ROUNDING"OSVS" FP-ROUNDING"OSVS" FP-ROUNDING"COB370"
HOST-NUMCOMPARE"1" HOST-NUMCOMPARE"1" HOST-NUMCOMPARE"1"
IBMCOMP IBMCOMP IBMCOMP
INDD"SYSIN 80 L A" INDD"SYSIN 80 L A" INDD"SYSIN 80 L A"
MAPNAME MAPNAME MAPNAME
NOMF NOMF NOMF
NOMFCOMMENT NOMFCOMMENT NOMFCOMMENT
NATIVE"EBCDIC" NATIVE"EBCDIC" NATIVE"EBCDIC"
ODOOSVS ODOOSVS
ODOSLIDE ODOSLIDE ODOSLIDE
NOOPTIONAL-FILE NOOPTIONAL-FILE NOOPTIONAL-FILE
OSVS OSVS
OUTDD"SYSOUT 132 L A" OUTDD"SYSOUT 132 L A" OUTDD"SYSOUT 132 L A"
PERFORM-TYPE"OSVS" PERFORM-TYPE"OSVS" PERFORM-TYPE"COB370"
NOQUOTE NOQUOTE NOQUOTE
RDW RDW
RECMODE"OSVS" RECMODE"OSVS"
REPORT-LINE"132" REPORT-LINE"132"
RTNCODE-SIZE"2" RTNCODE-SIZE"2" RTNCODE-SIZE"2"
NOSEG
SIGN"EBCDIC" SIGN"EBCDIC" SIGN"EBCDIC"
STICKY-LINKAGE"2" STICKY-LINKAGE"2" STICKY-LINKAGE"2"
STICKY-PERFORM STICKY-PERFORM
TRACE TRACE
NOTRUNC NOTRUNC NOTRUNC
TRUNCCOPY"8" TRUNCCOPY"8" TRUNCCOPY"8"
WARNING"3" WARNING"3" WARNING"3"
ZEROLENGTHFALSE
ZWB ZWB ZWB

DIALECT"SAA2"

DIALECT"SAA1"
NOANS85
AREACHECK AREACHECK
NOCOBOLDIR NOCOBOLDIR
COMS85 COMS85
COPYLBR COPYLBR
NODATE NODATE
DBCS"2" DBCS"2"
DEFAULTBYTE"0" DEFAULTBYTE"0"
FLAG"SAA" FLAG"SAA"
FLAGCD"W" FLAGCD"W"
FOLDCALLNAME"UPPER" FOLDCALLNAME"UPPER"
FOLDCOPYNAME"UPPER" FOLDCOPYNAME"UPPER"
IBMCOMP IBMCOMP
NOMF NOMF
NOMFCOMMENT NOMFCOMMENT
ODOOSVS ODOOSVS
ODOSLIDE ODOSLIDE
NOOPTIONAL-FILE NOOPTIONAL-FILE
RTNCODE-SIZE"2" RTNCODE-SIZE"2"
SAA"2" SAA"1"
NOSEG NOSEG
WARNING"3" WARNING"3"
ZEROLENGTHFALSE ZEROLENGTHFALSE

DIALECT"MF"
ANS85
NOAPOST
NOAREACHECK
ARITHMETIC"MF"
ASSIGN"DYNAMIC"
BOUND
NOBYTEMODEMOVE
CHARSET"ASCII"
CHECKDIV"ANSI"
NOCOBFSTATCONV
NOCOBOL370
NOCOMP
NOCOMS85
NOCOPYLBR
DBCHECK
DBCS"3"
NODBCSSOSI
DBSPACE
DEFAULTBYTE"32"
NODG
NODOSVS
DYNAM
NOFDCLEAR
NOFLAG
NOFLAGAS
NOFLAGCD
NOFLAGSTD
NOFOLDCALLNAME
NOFOLDCOPYNAME
NOFP-ROUNDING
NOHOST-NUMCOMPARE
NOIBMCOMP
NOINDD
NOMAPNAME
MF"11"
MFCOMMENT
NOMS
NATIVE"ASCII"
NONESTCALL
NOODOOSVS
NOODOSLIDE
OPTIONAL-FILE
NOOSVS
NOOUTDD
PERFORM-TYPE"MF"
QUOTE
NORDW
RECMODE"F"
REPORT-LINE"256"
RESEQ
NORM
RTNCODE-SIZE"4"
NOSAA
SEG
SIGN"ASCII"
NOSTICKY-LINKAGE
NOSTICKY-PERFORM
TERMPAGE
NOTRACE
TRUNC"ANSI"
NOTRUNCCOPY
NOVSC2
WARNING"1"
NOXOPEN
NOZEROLENGTHFALSE
NOZWB


DIRECTIVES
DIR

Makes the Compiler read directives from a file.

Syntax:
 >>-.---.-.-DIRECTIVES-.-"filename"---------><  
    .-/-+ .-DIR--------+
Parameters:
filename A full file specification.
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 line with an ampersand (&) in column 1, 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 several DIRECTIVES"filename". 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 assumed. If no file is found, the search is repeated with no extension.

See Also:

USE Compiler directive


DIRECTIVES-IN-COMMENTS

Makes the Compiler process $SET statements held in comment lines.

Syntax:
 >>-.---.-.----.--DIRECTIVES-IN-COMMENTS----><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NODIRECTIVES-IN-COMMENTS
Phase: Syntax check
$SET: Any
Comments:

This directive enables sources to contain directives used when compiling with the Server Express Compiler, but ignored (as comment lines) by any other compiler, such as a mainframe compiler.

Normally, $SET can appear anywhere on a line, as long as it is the first thing on the line. However, if this directive is set, the $SET statement is processed even if the line is a comment line (asterisk in column 7).


DOSVS

Specifies that words reserved in IBM DOS/VS COBOL are to be treated as reserved words.

Syntax:
 >>-.---.-.----.--DOSVS---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NODOSVS
Phase: Syntax check
$SET: Initial
Dependencies:

Set to NODOSVS immediately by OSVS.

See Also:

OSVS Compiler directive


DYNAM

Specifies that CANCEL statements are not to be ignored.

Syntax:
 >>-.---.-.----.--DYNAM---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: DYNAM
Phase: Syntax check
$SET: Initial
Comments:

With NODYNAM, CANCEL statements in the program are ignored.


EARLY-RELEASE

Enables support for Early User Syntax.

Syntax:
 >>-.---.-.----.--EARLY-RELEASE-------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOEARLY-RELEASE
Phase: Syntax check
$SET: Initial
Dependencies:

If NOEARLY-RELEASE and MF are set, MF defaults to MF"10".
If EARLY-RELEASE and MF are set, MF defaults to MF"11".

Comments:

You must specify this directive if you want to use any of the early-release directives.


ECHO

Makes the Compiler display error lines and error messages on the screen.

Syntax:
 >>-.---.-.----.--ECHO----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: ECHO
Phase: Syntax check
$SET: Any
Dependencies:

Set to NOECHO immediately by ECHOALL.

Comments:

For each error, the source line is displayed together with an error number and (unless BRIEF is set) an explanatory message.

See Also:

BRIEF Compiler directive


ECHOALL

Sends a full listing to the screen as well as to a printer or other device specified with the LIST or PRINT directive.

Syntax:
 >>-.---.-.----.--ECHOALL-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOECHOALL
Phase: Syntax check
$SET: No
Dependencies:

ECHOALL sets NOECHO immediately.


EDITOR

Makes the Compiler send error messages to a file in a format compatible with a specified editor.

Syntax:
 >>-.---.-.-----EDITOR--"editor-id"-.-------><  
    .-/-+ .-NO--EDITOR--------------+
Parameters:
editor-id Must be MF, MF2 or MS.
Properties:
Default: NOEDITOR
Phase: Syntax check
$SET: No
Dependencies:

EDITOR"MS" sets NOENSUITE immediately.
EDITOR"MF" sets ENSUITE"1" immediately.

Comments:

The possible values of editor-id are:

MF Server Express Editor
MF2 Animator
MS Microsoft Programmer's Workbench

You are recommended to use the NOECHO and NOQUERY directives in addition to the EDITOR directive.

See Also:

ECHO Compiler directive
FLAGSINEDIT Compiler directive
QUERY Compiler directive


ENSUITE

Reserved for internal use only.


ERRLIST

Specifies that the listing is to contain no source lines except those that have errors or flags.

Syntax:
 >>--.---.--.----.---ERRLIST---"option"--------><
     .-/-+  .-NO-+ 
Parameters:
option Type of listing produced. See Comments below.
Properties:
Default: ERRLIST"EMBED"
Phase: Syntax check
$SET: No
Dependencies:

ERRLIST"END"is switched to ERRLIST"VERBOSE" if FLAGQ or ERRQ are set.

Comments:

The possible values of option are:

TERSE Only lines containing errors are shown in the list file. Both source line and error are shown.
EMBED List file contains source listing with error messages embedded within it at the point they occur.
END List file contains source listing followed by error messages separately. In a batch compile, no error messages are echoed to screen unless a screen listing is selected.
VERBOSE List file contains source listing with error messages embedded within it at the point they occur followed by error messages relisted separately.

ERRQ

Makes the Compiler ask, each time it gives an error message, whether you want to stop compiling.

Syntax:
 >>-.---.-.----.--ERRQ----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOERRQ
Phase: Syntax check
$SET: Any

FASTSORT

This directive is reserved for internal use by this COBOL system. Because it might appear in the list of settings, it is included for completeness. It is not intended for your use, and its setting should not be changed.

Syntax:
 >>-.---.-.----.--FASTSORT------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: FASTSORT
Phase: Syntax check
$SET: Initial

FCD3

This directive is reserved for internal use by this COBOL system. Because it might appear in the list of settings, it is included for completeness. It is not intended for your use, and its setting should not be changed.

Syntax:
 >>-.---.-.----.--FCD3----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: FCD3 on 64-bit development systems
NOFCD3 on 32-bit development systems
Phase: Syntax check
$SET: No
Dependencies:

Set to FCD3 immediately by P64.


FCDREG

Makes the Compiler define special-registers giving access to File Control Descriptions (FCD) and Key Definition Blocks.

Syntax:
 >>-.---.-.----.--FCDREG--------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOFCDREG
Phase: Syntax check
$SET: Initial

FCDREG causes a special register, FH--FCD, to be created for each File Definition (FD) in the program. This register points to the File Control Description (FCD) for the file. Thus the program can read or change information in the FCD.

For each indexed file, an additional special register, FH--KEYDEF, is created. This register points to the Key Definitions Block for the file.

The layout of the FCD and the Key Definition Block is given in your File Handling book.


FDCLEAR

Specifies that the record buffer for a file should be cleared after every write operation. The buffer is cleared to the value specified by the DEFAULTBYTE directive.

Syntax:
 >>-.---.-.----.--FDCLEAR-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOFDCLEAR
Phase: Syntax check
$SET: Any
Comments:

The FDCLEAR directive is effective while the SELECT clauses are being processed. Use $SET statements before and after each SELECT clause to apply this feature to selected files. Alternatively, use it once before processing any SELECT statements to apply it to all files in a program.

The FDCLEAR directive is ignored for files subject to a SAME RECORD AREA clause in the I-O-Control paragraph.

Example:

In the following code, FDCLEAR is applied only to file-2:

 file-control. 
     select file-1 ... 
$set fdclear 
     select file-2 ... 
$set nofdclear 
     select file-3 ...

FILESHARE

Causes the default locking to become AUTOMATIC rather than EXCLUSIVE for files in a multi-user environment, and automatically locks records on a WRITE or REWRITE statement when the program is locking multiple records.

This directive is not related in any way to Fileshare Version 2.

You must not use this directive when using Fileshare Version 2.

Syntax:
 >>-.---.-.----.--FILESHARE-----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOFILESHARE
Phase: Syntax check
$SET: Initial
Comments:

This directive is included for compatibility with earlier file-sharing products. When writing new programs you should use the locking syntax rather than this directive.

FILESHARE is equivalent to WRITELOCK and AUTOLOCK together. NOFILESHARE is equivalent to NOAUTOLOCK and NOWRITELOCK together.


FILETYPE

Specifies the file format to use when creating files.

Syntax:
 >>-.---.--FILETYPE--"integer"--------------><  
    .-/-+
Parameters:
integer An integer representing the type to use.
Properties:
Default: FILETYPE"0"
Phase: Syntax check
$SET: Any
Dependencies:

FILETYPE"integer" sets IDXFORMAT"integer" immediately.

Comments:

The possible values of integer are:

0 System specific default. This is the same as specifying 1.
1 C-ISAM format.
2 Micro Focus Level II format.
3 Micro Focus indexed file format.
4 Optimized Micro Focus indexed file format, for fast duplicate file handling.
5 Reserved.
6 Reserved.
7 RLIO format indexed files.
8 Large indexed files.
9-10 Reserved.
11 Mainframe print file format.
12-13 Reserved.
14 Reserved.
15-255 Reserved.

This directive only works on files processed by the Callable File Handler. Use the CALLFH directive if you are processing files other than indexed files.

To produce print files in the style of an IBM mainframe using FILETYPE"11", you must also:

(Print files in the style of an IBM mainframe have print control character in the first column.)

See Also:

ADV Compiler directive
CALLFH Compiler directive


FLAG

Makes the Compiler produce language-level certification flags when it finds syntax that is not part of a specified dialect of COBOL.

Syntax:
 >>-.---.-.-----FLAG--"dialect"-.-----------><  
    .-/-+ .-NO--FLAG------------+
Parameters:
dialect A literal identifying the dialect.
Properties:
Default: NOFLAG
Phase: Syntax check
$SET: Any
Comments:

The possible values of dialect are:

MF Micro Focus
ANS74 ANSI COBOL standard X3.23, 1974
ANS85 ANSI COBOL standard X3.23, 1985
SAA Full implementation of IBM's System Application Architecture definition of COBOL
VSC2 IBM VS COBOL II
OSVS IBM OS/VS COBOL
DOSVS IBM DOS/VS COBOL
COBOL370 IBM COBOL/370
ISO2000 Proposed ISO2000 COBOL standard.
BS2000 Siemens BS2000 COBOL

You cannot use DG, RM or MS as a dialect.

When creating a program that is to be fully ANSI'85 conforming, use:

ANS85 FLAG"ANS85"

and correct anything that causes a flagging message to be produced.

For VSC2, the flagging given depends on the version of VS COBOL II selected by the VSC2 directive. For SAA, the flagging given depends on the level of SAA selected by the SAA directive. For COBOL370, the flagging depends on the level of COBOL/370 selected by the COBOL370 directive.

See Also:

BS2000 Compiler directive
DIALECT Compiler directive
ISO2000 Compiler directive


FLAGAS

Makes the Compiler output flagging messages as error messages, warning messages or informational messages.

Syntax:
 >>-.---.-.-----FLAGAS--"severity"-.--------><  
    .-/-+ .-NO--FLAGAS-------------+
Parameters:
severity A literal showing the severity to assign to flag messages.
Properties:
Default: NOFLAGAS
Phase: Syntax check
$SET: Any
Comments:

The possible values of severity are:

S Severe error
E Error
W Warning
I Informational

FLAGCD

When used with the FLAG directive, FLAGCD flags any directive settings that cause incompatibility with the specified dialect of COBOL.

Syntax:
 >>-.---.-.--------FLAGCD--"severity"-.-----><  
    .-/-+ ..----.--FLAGCD-------------+ 
           .-NO-+
Parameters:
severity A literal showing the severity to assign to flag messages arising from conflicting directives.
Properties:
Default: NOFLAGCD
Phase: Syntax check
$SET: Any
Comments:

The possible values of severity are:

S Severe error
E Error
W Warning
I Informational

If FLAGCD is specified with no parameters, the messages are assigned the severity given by the FLAGAS directive, if specified; if FLAGAS is not specified, they are produced as flagging messages.


FLAGMIG

Causes the Compiler to flag any syntax that behaves differently at run time depending on the setting of CMPR2.

Syntax:
 >>-.---.-.----.--FLAGMIG-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOFLAGMIG
Phase: Syntax check
$SET: Any
Comments:

Such syntax receives W-level messages, with the additional text "MIGR" in the message line to show the warning results from specifying the FLAGMIG directive.

See Also:

CMPR2 Compiler directive


FLAGQ

Makes the Compiler ask, each time it gives a flagging message, whether you want to stop compiling.

Syntax:
 >>-.---.-.----.--FLAGQ---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOFLAGQ
Phase: Syntax check
$SET: Any

FLAGSINEDIT

Specifies whether flagging messages are to be included in an error file.

Syntax:
 >>-.---.-.----.--FLAGSINEDIT---------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: FLAGSINEDIT
Phase: Both
$SET: No
Comments:

This directive has no effect if NOEDITOR is specified. If EDITOR and FLAGSINEDIT are specified, the error file produced contains all flagging messages produced by the Compiler.

See Also:

EDITOR Compiler directive


FLAGSTD

Makes the Compiler produce language-level certification flags when it finds syntax that is not part of a specified level of the ANSI'85 Standard.

Syntax:
 >>-.---.-.-----FLAGSTD--"string"-.---------><  
    .-/-+ .-NO--FLAGSTD-----------+
Parameters:
string List of language levels
Properties:
Default: NOFLAGSTD
Phase: Syntax check
$SET: Initial
Comments:

string contains a list of parameters, each defining a language level or optional module of the ANSI Standard. A feature is not flagged if it is in one of the specified levels or below, or in one of the specified optional modules. A feature is flagged if it is an extension, in a higher level of the Standard, or in an optional module not specified. In addition, it is possible to flag elements identified as Obsolete by the ANSI Standard.

string consists of a combination of the following parameters:

M ANSI'85 defined Minimum COBOL subset
I ANSI'85 defined Intermediate COBOL subset
H ANSI'85 defined High COBOL subset
C1 Communications optional module level 1
C2 Communications optional module level 2
D1 Debug optional module level 1
D2 Debug optional module level 2
S1 Segmentation optional module level 1
S2 Segmentation optional module level 2
R Report writer optional module
O Obsolete language elements

They can appear in any order but must be separated by at least one space. The following combination of flags can be specified:

FLAG and FLAGSTD provide similar functionality and thus only one can be used.

The ANS85 directive must be on.


FOLD-CALL-NAME

Folds the identifier and/or literal associated with CALL, CANCEL, ENTRY, and CHAIN statements and the program-name in the PROGRAM-ID paragraph to upper or lower case.

Syntax:
 >>-.---.-.-----FOLD-CALL-NAME--"case"-.----><  
    .-/-+ .-NO--FOLD-CALL-NAME---------+
Parameters:
case UPPER or LOWER
Properties:
Default: NOFOLD-CALL-NAME
Phase: Syntax check
$SET: Initial
Comments:

The Compiler also accepts the directive-name without hyphens; that is FOLDCALLNAME.

In a CALL identifier statement, the name called is given the case specified by this directive, but the actual contents of identifier are not changed.

The FOLD-CALL-NAME directive can help in the transfer of COBOL code from an environment with filenames which are not case specific to one which is, for example, from OS/2 to UNIX.

It also makes the Compiler conform with the ANSI'85 standard interprogram communications module, in which the case of a program-name in a CALL statement does not matter.

With NOFOLD-CALL-NAME, by normal COBOL convention the program-name is folded to upper case unless enclosed in quotes. This also applies to the root program of a nested program. All the subprogram-names are folded to upper case even when in quotes. (Enclosing program-names in quotes is a Micro Focus COBOL extension. See the section The Program-ID Paragraph in your Language Reference.)

The program-name is also accessible as an entry point in a fully linked executable.


FOLD-COPY-NAME

Determines whether copyfile names should be converted to upper case or lower case.

Syntax:
 >>-.---.-.-----FOLD-COPY-NAME--"case"-.----><  
    .-/-+ .-NO--FOLD-COPY-NAME---------+
Parameters:
case "UPPER" or "LOWER".
Properties:
Default: NOFOLD-COPY-NAME
Phase: Syntax check
$SET: Any
Comments:

The Compiler also accepts the directive-name without hyphens; that is FOLDCOPYNAME.

The FOLD-COPY-NAME directive affects both text and library-names regardless of whether they are specified as user-defined words or literals.

Example:

Specifying FOLD-COPY-NAME"UPPER" converts copyfile names to upper case (also known as folding to upper case).


FORM

Specifies the number of lines on each page of the listing.

Syntax:
 >>-.---.-.-----FORM--"integer"-.-----------><  
    .-/-+ .-NO--FORM------------+
Parameters:
integer Must be greater than 3.
Properties:
Default: FORM"60"
Phase: Syntax check
$SET: Any
Dependencies:

Set to NOFORM at end by NOLIST.
Set to FORM"60" immediately by LIST.

Comments:

With FORM"integer", a form-feed character is always produced at the head of the listing file. With NOFORM, no form-feed characters or page headings are produced anywhere in the listing.


FP-ROUNDING

Determines whether one floating-point receiving item can affect the results of other, non-floating-point receiving items.

Syntax:
 >>-.---.-.-----FP-ROUNDING--"dialect"---.--><  
    .-/-+ .-NO--FP-ROUNDING--------------+
Parameters:
dialect Must be VSC2 or OSVS.
Properties:
Default: NOFP-ROUNDING
Phase: Syntax check
$SET: Any
Comments:

In OS/VS COBOL and VS COBOL II, if any of the sending data items of an arithmetic statement are floating-point, all receiving fields are rounded, regardless of the presence or absence of the ROUNDED phrase and regardless of whether or not the receiving fields are floating-point.

In VS COBOL II, if any receiving data item is defined as floating-point, rounding takes place for all receiving data items regardless of the presence or absence of the ROUNDED phrase, of whether or not the receiving field is floating-point, and of whether or not there are any sending items which are floating-point.

With NOFP-ROUNDING, no rounding takes place for fixed-point targets in calculations involving floating-point operands unless the ROUNDED phrase is explicitly used in the source.

Example:

If two data items are defined as follows:

     05 numeric-field    pic 999. 
     05 floating-field   comp-1.

and the following statement is executed:

     compute numeric-field floating-field = 7.7 + 1

specifying FP-ROUNDING"VSC2" results in numeric-field containing 9 (rounded), whereas specifying NOFP-ROUNDING or FP-ROUNDING"OSVS" would result in numeric-field containing 8 (truncated).

If, using the same two data items, the following statement is executed:

compute numeric-field = +7.6E0

specifying FP-ROUNDING"VSC2" or FP-ROUNDING"OSVS" results in numeric-field containing 8 (rounded), whereas specifying NOFP-ROUNDING results in numeric-field containing 7 (truncated).


GNTANLZ

Enables you to use the GNT Analyzer, which is a stand-alone tool for creating a statistical execution profile of a program.

Syntax:
 >>-.---.-.-----GNTANLZ--"count-type"-----.----><  
    .-/-+ .-NO--GNTANLZ-------------------+
Parameters:
count-type The type of count needed.
Properties:
Default: NOGNTANLZ
Phase: Syntax check
$SET: Any
Comments:

Possible values of count-type are:

COUNT Count the number of times each block is executed.
TICK For each block of code, set the count to one when it is executed. This uses less memory than COUNT
See Also:

The chapter GNT Analyzer in your Utilities Handbook.


HIDE-MESSAGE

This directive has been replaced by the directive CHANGE-MESSAGE. It remains for compatibility only, and will be removed in a future release.

Registers the number of a syntax check error message to "hide" so that if the error is encountered it is ignored.

Syntax:
 >>-.---.-.-----HIDE-MESSAGE--"integer"-----.----><  
    .-/-+ |                                 | 
          .-NO--HIDE-MESSAGE--.-----------.-+ 
                              .-"integer"-+
Parameters:
integer The number of the syntax check error message to hide.
Properties:
Default: NOHIDE-MESSAGE
Phase: Syntax check
$SET: Any
Comments:

The Compiler also accepts the directive-name without a hyphen; that is HIDEMESSAGE.

HIDE-MESSAGE"integer" adds integer to a list of syntax check error message numbers. To hide several error message numbers using this feature, you must use the HIDE-MESSAGE directive repeatedly.

When the program is being syntax checked, any message with severity E, W, I, or flag with its number in the list is not shown in any listing. It is not included in the error summary at the end of the compilation.

Messages with severity S can be hidden only if they were made severity S by the CHANGE-MESSAGE, FLAGAS or FLAGCD directives. Normally, they are always shown, even if their number appears in this list.

NOHIDE-MESSAGE clears the list of numbers so no messages are hidden.

NOHIDE-MESSAGE"integer" removes only the specified message number from the list.

See Also:

CHANGE-MESSAGE Compiler directive
FLAGAS Compiler directive
FLAGCD Compiler directive


HOSTFD

Specifies that the record area associated with a file should only be allocated at the time of an OPEN statement and not before.

>>-.---.-.----.--HOSTFD-------------->< 
   .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOHOSTFD
Phase: Syntax check
$SET: Initial
Comments:

If you specify this directive, operations on the record area associated with a file are only possible while the file is open. HOSTFD does not affect EXTERNAL or SORT files. Nor does it affect files defined in a SAME RECORD AREA clause in the I-O CONTROL paragraph.

This directive is for mainframe compatibility.


HOST-NUMCOMPARE

Controls the operation of comparisons between integer numeric data items of USAGE DISPLAY and alphanumeric literals or figurative constants.

Syntax:
 
>>--.---.--.------HOST-NUMCOMPARE--"integer"--.--><
    .-/-+  .-NO---HOST-NUMCOMPARE-------------+
Parameters:
integer Must be 1 or 2
Properties:
Default: NOHOST-NUMCOMPARE
Phase: Syntax check
$SET: Any
Comments:

The value you can set for integer are:

1 If the ZWB directive is also specified, HOST-NUMCOMPARE only affects comparisons involving unsigned numeric data items. If NOZWB is specified, HOST-NUMCOMPARE affects comparisons involving both signed and unsigned data items.

If HOST-NUMCOMPARE is specified, affected comparisons are treated as if the numeric data item were redefined as an alphanumeric item of the same length, and the comparison made against this redefinition. If NOHOST-NUMCOMPARE is specified, the numeric field is first moved to an elementary alphanumeric data item of the same size, and the content of this alphanumeric item is then compared to the literal.

2 Improves compatibility with IBM mainframe compilers for a subset of IF statements involving comparisons between numeric data items and numeric literals. Setting HOST-NUMCOMPARE"2" does not provide 100% compatibility with the IBM mainframe behavior, but does provide emulation for the most common cases.

The HOST-NUMCOMPARE directive only affects comparisons where the numeric data item contains non-numeric data at the time of the comparison.

See Also:

ZWB Compiler directive


HOST-NUMMOVE

Ensures that run-time error 163 (illegal characters in numeric fields) does not occur when certain MOVE statements are executed on numeric display data items.

Syntax:
 >>--.---.--.------HOST-NUMMOVE--"integer"--.--><
     .-/-+  .-NO---HOST-NUMMOVE-------------+
Parameters:
integer Must be 1 or 2.

None

Properties:
Default: NOHOST-NUMMOVE
Phase: Syntax check
$SET: Any
Comments:

Possible values of integer are:

1 Improves compatibility with IBM mainframe compilers. However, although this setting the directive to this value causes the error to be suppressed, the result of moving the invalid data is not the same as on the mainframe.
2 Improves compatibility with IBM mainframe compilers for a subset of MOVE statements involving numeric/alphanumeric data types and numeric/numeric data types.

HOST-NUMMOVE"2" does not provide 100% compatibility with the IBM mainframe behavior, but does provide emulation for the most common cases.

Specifying HOST-NUMMOVE with no parameter is the same as specifying HOST-NUMMOVE"1".

See Also:

Run-time system error 163


HOSTSIGNS

Allows arithmetic and moves with COMP-3 items with illegal sign nibbles (such as those produced by a redefinition of the item) to produce the desired result.

Syntax:
 >>-.---.-.----.---HOSTSIGNS----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOHOSTSIGNS
Phase: Generate
$SET: Initial
Comments:

Specifying HOSTSIGNS causes COMP-3 arithmetic to be performed by a non-optimized route, reducing the efficiency of your programs.

For smaller, faster code you should not specify HOSTSIGNS.


IBM-MS

Specifies that words reserved in IBM COBOL V1.00 are to be regarded as reserved words, and changes the behavior of certain features to be compatible with that COBOL system.

Syntax:
 >>-.---.-.----.--IBM-MS--------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOIBM-MS
Phase: Syntax check
$SET: Initial
Dependencies:

IBM-MS sets DEFAULTBYTE"0" and ACCEPTREFRESH immediately.

Comments:

This directive is synonymous with the PC1 and MS"1" directives.


IBMCOMP

Turns on word-storage mode.

Syntax:
 >>-.---.-.----.--IBMCOMP-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOIBMCOMP
Phase: Syntax check
$SET: Initial
Dependencies:

IBMCOMP sets ALIGN"8" immediately.

Comments:

In word-storage mode every data item of USAGE COMP or COMP-5 occupies either two bytes or a multiple of four bytes. If you specify IBMCOMP and you use the SYNCHRONIZED clause on any items defined as USAGE COMP or COMP-5 in your program, do not specify ALIGN"1".

If you are calling any Micro Focus COBOL systems routines directly, use IBMCOMP with great care. It might cause the parameters you specify to these routines to be incorrectly aligned and sized, causing the routines to give incorrect results. This includes parameters for the CBL_ library routines, calls to Adis anddirect calls to the Callable File Handler.


IDXFORMAT

Specifies the format to use when creating indexed files.

Syntax:
 >>-.---.--IDXFORMAT--"integer"-------------><  
    .-/-+
Parameters:
integer An integer representing the type to use.
Properties:
Default: IDXFORMAT"0"
Phase: Syntax check
$SET: Any
Dependencies:

Set to IDXFORMAT"integer" immediately by FILETYPE"integer".

Comments:

The possible values of integer are:

0 System specific default. This is the same as specifying 1.
1 C-ISAM format.
2 Micro Focus Level II format.
3 Micro Focus indexed file format.
4 Optimized Micro Focus indexed file format, for fast duplicate file handling.
5 Reserved.
6 Reserved.
7 RLIO format indexed files.
8 Large indexed.
9-10 Reserved.
11 Mainframe print file format.
12-13 Reserved.
14 Heap file.
15-255 Reserved.

Existing files in any of the given formats are processed correctly without the need for this directive. This directive controls the format used when creating new files.

Specifying 3 always causes the format used by this COBOL system to be created; if you specify 0, and you are using your program with a file handler from a different system, the default for that system is created.

Specifying 4 might make the files larger than their IDXFORMAT"3" equivalents.

Micro Focus Level II format files are compatible with Micro Focus Level II COBOL, Professional COBOL V1.2, and VS COBOL Workbench versions up to and including V1.3. (See your File Handling book for further information.)

You must not use the ANS85 directive to enable ANSI'85 behavior when using IDXFORMAT"2". However, you can use ANS85"SYNTAX" to enable ANSI'85 syntax.


INDD

Causes ACCEPT statements to read from a specified file.

Syntax:
 >>-.---.-.-------INDD--"fname rsize rtype ctype"-.-->< 
    .-/-+ .-------INDD--"fname rsize rtype"-------| 
          .-------INDD--"fname rsize"-------------| 
          .-------INDD--"fname"-------------------| 
          ..----.-INDD----------------------------+ 
           .-NO-+
Parameters:
fname Name of file to be read for the specified ACCEPT statements. The default is SYSIN.
rsize Size of the data records in the file. The default is 80.
rtype Either L for line sequential or r for record sequential. The default is L.
ctype Either A for ASCII or E for EBCDIC. The default is A.

E only has effect when the CHARSET"EBCDIC" directive is used.

Properties:
Default: NOINDD
Phase: Syntax check
$SET: Initial
Comments:

When INDD is specified, all Format 1 ACCEPT statements which either have no FROM option or specify FROM SYSIN (or the mnemonic-name associated with SYSIN) are transformed into READ statements, reading from a file with the specified external filename.

The filename can be mapped onto physical filenames in the same way as other files with external filenames; that is, by using environment variables or, if it is available on your system, the External File Mapper.

See Also:

ACCEPT statement
OUTDD Compiler directive


INFORETURN

Specifies the return-code value returned by the Compiler when it produces only informational messages.

Syntax:
 >>-.---.--INFORETURN--"integer"------------><  
    .-/-+
Parameters:
integer Must be a value in the range 0 through 4.
Properties:
Default: INFORETURN"0"
Phase: Syntax check
$SET: Any
Comments:

When the Compiler terminates it returns a value that can be tested by an operating system command to determine the success or otherwise of the compilation. The values for termination are described in the section Compiler Error Messages in the chapter Using the Compiler. This directive enables you to set the value to be returned if the Compiler only outputs informational messages.


INITCALL

Specifies modules to be called immediately before the first statement of the program is executed.

Syntax:
 >>-.---.--.-----INITCALL--"module"-.------------.-.--><  
    .-/-+  |                        .-"priority"-+ | 
           .-NO--INITCALL--------------------------+
Parameters:
module The module to be called.
priority The priority to assign to the execution of the module.
Properties:
Default: NOINITCALL
Phase: Syntax check
$SET: Initial
Comments:

The possible values of priority are:

H High priority (the default if no priority is specified)
L Low priority

Specifying INITCALL causes the Compiler to insert a call to the named module. At run time, the module specified is called before any procedural code is executed. You cannot pass parameters to the called module.

To call several modules using this feature, you must use the INITCALL directive repeatedly. NOINITCALL clears the list of modules to be called.

Calls specified with a high priority are placed before all calls with a low priority, as well as other calls made by the Compiler. Low priority calls are placed after other calls made by the Compiler. Calls with the same priority are executed in the order they are specified.


INTDATE

Selects the starting date for integer format dates used with date intrinsic functions.

Syntax:
>>-.---.------INTDATE---"type"-----><
   .-/-+
Parameters:
type The type of starting date.
Properties:
Default: ANSI
Phase: Syntax check
$SET: Any
Comments:

This directive selects the starting date for integer format dates used with date intrinsic functions (that is, DATE-OF-INTEGER, DAY-OF-INTEGER, INTEGER-OF-DATE, INTEGER-OF-DAY).

type can be:

ANSI Instructs the Compiler to use the ANSI COBOL Standard starting date (where Day 1 = Jan 1, 1601).
LILIAN Instructs the Compiler to use the Lilian starting date (where Day 1 = Oct 15, 1582).

For more details on the date intrinsic functions, see your Language Reference.


INTLEVEL

When intermediate code is being created by the Compiler, this directive controls the level of portability of the code created to different versions of Micro Focus COBOL systems in other environments.

Syntax:
 >>-.---.-.-----INTLEVEL--"integer"-.-------><  
    .-/-+ .-NO--INTLEVEL------------+
Parameters:
integer The level of portability. Can be 2, 4 or 5.
Properties:
Default: INTLEVEL"2"
Phase: Syntax check
$SET: No
Dependencies:

Set to INTLEVEL"5" immediately by P64.

Comments:

Full details of intermediate code portability are included with the relevant COBOL systems.

NOINTLEVEL causes intermediate code to be created that is suitable for execution only in this environment.

INTLEVEL"integer" creates intermediate code that can be executed by some versions of Micro Focus COBOL products in other environments. For portability between environments, the value of integer used for compilation must be supported by the Micro Focus COBOL system on each environment on which you want to execute the intermediate code.

INTLEVEL"integer" can limit the syntax that can be used in your program.

Use INTLEVEL"4" or above if you are compiling a program that is using syntax defined in the proposed ISO2000 standard. INTLEVEL"4" is set by default if you set DIALECT"ISO2000". If you do set these directives then, as the OO syntax proposed in the ISO2000 standard is different to that used in Server Express, OO programs created using Server Express will fail.

See Also:

DIALECT Compiler directive
ISO2000 Compiler directive


IOCONV

Selects between a straight group move and conversion of elementary record descriptions (ANSI behavior) when processing READ ... INTO and WRITE ... FROM statements.

Syntax:
 >>-.---.-.----.--IOCONV--------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: IOCONV
Phase: Syntax check
$SET: Any
Comments:

NOIOCONV causes a straight group move for READ ... INTO and WRITE ... FROM operations. This is for backward compatibility.

IOCONV causes conversion of elementary record descriptions when required. This is normal ANSI behavior, and the default.


ISO2000

Specifies that words reserved in the proposed ISO2000 COBOL Standard are to be treated as reserved words, and changes the behavior of certain features to be compatible with that Standard.

Syntax:
>>-.---.-.----.---ISO2000--------------><
   .-/-+ .-NO-+ 
Parameters:

None.

Properties:
Default: NOISO2000
Phase: Syntax check
$SET: Initial
Comments:

For full compatibility with the proposed ISO2000 standard, you should also set the DIALECT"ISO2000" directive. If you do set these directives then, as the OO syntax proposed in the ISO2000 standard is different to used in Server Express, OO programs created using Server Express will fail.

See Also:

DIALECT Compiler directive
INTLEVEL Compiler directive


IXNLSKEY

Specifies that the File Handler should sort index file keys according to the local collating sequence, rather than using the ASCII collating sequence.

Syntax:
>>-.---.-.----.---IXNLSKEY--------------><
   .-/-+ .-NO-+ 
Parameters:

None.

Properties:
Default: NOIXNLSKEY
Phase: Syntax check
$SET: Any
Comments:

If you move the index file to a system with a different locale, the index keys will no longer to be found.


IXNUMKEY

Enables true numeric sorting on index keys.

Syntax:
>>-.---.-.----.---IXNUMKEY--------------><
   .-/-+ .-NO-+ 
Parameters:

None.

Properties:
Default: NOIXNUMKEY
Phase: Syntax check
$SET: Any
Comments:

Index keys are normally treated as alphanumeric even if they contain numeric data. Therefore, the results of READ NEXT operations might be unexpected. This directive should be used when true numeric order is required. In general it only has an effect for keys defined as signed numeric, but some kinds of unsigned data (for instance COMP-5) might also be affected.

For example, say you have a key defined as pic s9(5), and you have four records for which the key values were 1, -2, 3, -4, stored as:

00001+
00002-
00003+
00004-

If these keys are treated as alphanumeric, they will be retrieved in the above order. However if they are treated as numeric (which is the case when IXNUMKEY is specified), they will be stored (and therefore retrieved when using READ NEXT) in numeric order:

00004-
00002-
00001+
00003+

JAPANESE

Enables the use of Micro Focus Japanese Language Extension (PIC N, Japanese data-names and Japanese procedure-names).

Syntax:
 >>-.---.-.-------JAPANESE--"integer"-.-----><  
    .-/-+ ..----.-JAPANESE------------+ 
           .-NO-+
Parameters:
integer Must be 1 or 2. The level of support required.
Properties:
Default: NOJAPANESE
Phase: Syntax check
$SET: Initial
Comments:

The possible values of integer are:

1 Compatibility with previous versions of Nihongo Micro Focus products
2 Enhanced PIC N support. This setting enables the DBSPACE directive.

Specifying JAPANESE with no parameter is the same as specifying JAPANESE"2".

This directive is provided for compatibility purposes only. It has been replaced by the NCHAR directive. JAPANESE and NCHAR are synonymous. The JAPANESE and DBCS directives are mutually exclusive.

See Also:

DBCS Compiler directive
DBSPACE Compiler directive
NCHAR Compiler directive


KEEP-INT

Specifies whether the Compiler should produce intermediate code for an unsuccessful compilation; that is a compilation that produces serious or unrecoverable errors.

Syntax:
 >>-.---.-.----.--KEEP-INT------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: KEEP-INT
Phase: Syntax check
$SET: Any
Comments:

The Compiler also accepts the directive-name without a hyphen; that is KEEPINT.

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.


KEYCHECK

Specifies whether the File Handler checks that all the keys belonging to the indexed file you are opening are defined in your application.

Syntax:
 >>---.---.--.----.-----KEYCHECK----------><
      .-/-+  .-NO-+
Properties:
Default: KEYCHECK
Phase: Syntax check
$SET: Any
Comments:

If you specify KEYCHECK, all key definitions must be specified and must match, otherwise a 3/9 error is returned. If you specify NOKEYCHECK, the File Handler opens the file without any checks on key definitions. If the file is opened with NOKEYCHECK set, and if one or more of the keys does not match, then any I/O operation that explicitly references a non-matching key (for example, a READ or START with the KEY phrase) will result in a 3/9 error.


KEYCOMPRESS

Specifies the type of key compression to be done on indexed files.

Syntax:
 >>-.---.-.-----KEYCOMPRESS--"integer"-.----><  
    .-/-+ .-NO--KEYCOMPRESS------------+
Parameters:
integer Must be between 0 and 7.
Properties:
Default: NOKEYCOMPRESS
Phase: Syntax check
$SET: Any
Comments:

integer can contain any combination of the following values:

1 Suppress repetitions of duplicate keys.
2 Suppress leading characters that are the same as in the previous key.
4 Suppress trailing spaces.

You can specify any combination of these numbers by adding these values together.

KEYCOMPRESS"0" is equivalent to NOKEYCOMPRESS.

You need specify key compression only when creating the file. Subsequently, key compression is detected when the file is opened.

To get key compression on an individual file, use $SET statements in your source so that this directive is in effect only for the part of the source containing the relevant KEY clause in the file's SELECT statement.


LIBRARIAN

Allows -INC statements in your program.

Syntax:
 >>-.---.-.----.--LIBRARIAN-----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOLIBRARIAN
Phase: Syntax check
$SET: Any
Comments:

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.


LINE-COUNT

Controls the detail of information displayed at the end of a source listing.

Syntax:
 >>-.---.-.-------LINE-COUNT--"integer"-.----><  
    .-/-+ ..----.-LINE-COUNT------------+ 
           .-NO-+
Parameters:
integer Must be 1 or 2.
Properties:
Default: NOLINE-COUNT
Phase: Syntax check
$SET: Initial
Comments:

integer controls the detail displayed, as follows:

1 The number of source lines checked, excluding blank lines and comments, is displayed at the end of the source listing.
2 As well as number of source lines checked, many additional details are displayed at the end of the source listing. These include the number of calls, the number of sections and the number of conditions in the program.

Specifying LINE-COUNT with no integer is the same as specifying LINE-COUNT"2".

See Also:

LIST Compiler directive


LINKCHECK

Specifies that each time a Linkage Section item is referenced a check is to be made that it exists.

Syntax:
 >>-.---.-.----.--LINKCHECK-----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOLINKCHECK
Phase: Generate
$SET: Initial
Dependencies:

Set to LINKCHECK by CHECK

Comments:

The PARAMCOUNTCHECK directive must also be specified if you intend to use the LINKCHECK directive.

If you set this directive, then for any reference to a Linkage Section item that does not exist a run-time error 203 (CALL parameter not supplied) is generated.

See Also:

CHECK Compiler directive
PARAMCOUNTCHECK Compiler directive


LIST

Specifies the destination of the source listing file.

Syntax:
 >>-.---.-.-------LIST-.-"destination"-.-.--><  
    .-/-+ |            .-()------------+ | 
          ..----.-LIST-------------------+ 
           .-NO-+
Parameters:
destination A full file specification or a device-name.
Properties:
Default: NOLIST
Phase: Syntax check
$SET: Any (for LIST and NOLIST) None (for LIST"filename" and LIST())
Dependencies:

NOLIST sets NOFORM, NOREF, NOSETTING, and NOXREF at end.
LIST sets FORM"60" immediately.
Set to NOLIST by RNIM at end.

Comments:

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. 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.

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.


LISTPATH

Specifies a path on which the list file is to be written. The name of the list file is source-name.lst.

Syntax:
 >>-.---.-.----.--LISTPATH--"list-path"-----><  
    .-/-+ .-NO-+
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
$SET: Initial

LISTWIDTH

Sets the width of the listing.

Syntax:
 >>-.---.--.-LISTWIDTH-.-"width"------------><  
    .-/-+  .-LW--------+
Parameters:
width Width in characters. It must be between 72 and 132.
Properties:
Default: LISTWIDTH"80"
Phase: Syntax check
$SET: Any
Comments:

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.


LITLINK

Makes the Compiler declare the literals in CALL literal statements as public symbols, so they are resolved at link time rather than run time. (Calls generated in this way are referred to as litlinked.)

Syntax:
 >>-.---.-.-----LITLINK-.-----------.-.-----><  
    .-/-+ |             .-"integer"-+ | 
          .-NO--LITLINK---------------+
Parameters:
integer Must be 1 or 2.
Properties:
Default: NOLITLINK
Phase: Generate
$SET: Initial
Comments:

This directive only affects object code files.

With LITLINK"2", 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 or LITLINK"1", all CALL literal statements generate litlinked calls, regardless of whether underscores are included at the start of the literal.

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.


LITVAL-SIZE

Specifies the number of bytes to pass if the SIZE clause is omitted when passing numeric literals BY VALUE.

Syntax:
 >>-.---.--LITVAL-SIZE--"integer"-----------><  
    .-/-+
Parameters:
integer A number up to 4. The number of bytes to pass.
Properties:
Default: LITVAL-SIZE"4"
Phase: Syntax check
$SET: Any

LNKALIGN

Indicates that any linkage records specified in a USING statement are 01 or level-77 items, aligned according to the ALIGN directive.

Syntax:
 >>-.---.-.----.--LNKALIGN------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOLNKALIGN
Phase: Generate
$SET: No
Comments:

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


LOCALCOUNT

This directive is reserved for internal use by this COBOL system. Because it might appear in the list of settings, it is included for completeness. It is not intended for your use, and its setting should not be changed.

Syntax:
 >>-.---.--LOCALCOUNT--"integer"------------><  
    .-/-+
Parameters:
integer Must be in the range 0 to 65536
Properties:
Default: LOCALCOUNT"0"
Phase: Syntax check
$SET: Initial

LOCKTYPE

Specifies the type of record locking.

Syntax:
 >>-.---.--LOCKTYPE--"integer"--------------><  
    .-/-+
Parameters:
integer The type of locking.
Properties:
Default: LOCKTYPE"0"
Phase: Syntax check
$SET: Initial
Comments:

The possible values of integer are:

0 Programs can read locked records, but not access them in other ways. This is the standard method with this COBOL system.
1 Programs cannot access locked records at all. This is as in languages other than COBOL.
2 Creates a new file with the same basename as the file being opened but with a .lck extension. Any record locks are recorded in this file. This enables the file handler to read and write to files up to 4 Gigabytes in size regardless of whether the file is shared or locked. You cannot set this value for striped files.

This directive only has an effect if the CALLFH directive is used.

See Also:

CALLFH Compiler directive


MAKESYN

Makes one reserved word synonymous with another.

Syntax:
 >>--MAKESYN-"rsv-word-1" = "rsv-word-2"--->< 
Parameters:
rsv-word-1 A reserved word.
rsv-word-2 The reserved word whose meaning is to be changed.
Properties:
Default: No reserved word synonyms are created.
Phase: Syntax check
$SET: Initial
Comments:

The equals sign (=) must be surrounded by spaces. You can also leave a space between the directive and its option to improve readability. If you are specifying this directive to the -C option of the Cob command line, you need to ensure that all characters are escaped correctly for the UNIX shell. See the section Option Configuration in the chapter COBOL System Interface (Cob) for details. For example, to specify MAKESYN on the command line:

cob -C 'makesyn "low" == "lowlight"' a.cbl

This directive does not appear in the list created with the SETTING directive.


MAPNAME

Makes the Compiler alter program-names and entry-points to make them compatible with OS/VS COBOL, DOS/VS COBOL, VS COBOL II and COBOL/370.

Syntax:
 >>-.---.-.----.--MAPNAME-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOMAPNAME
Phase: Syntax check
$SET: Initial
Comments:

Specifying MAPNAME affects program-names and entry-points defined in the compilation and those referenced by the program as follows:

When a name is found to be incompatible a warning message is given and a modified name is used in the object program. The rules enforced and the modifications made are:

           0       becomes    J 
           1 - 9   become     A - I

MAX-ERROR

Causes the Compiler to abort when the specified number of errors have been produced.

Syntax:
 >>-.---.-.-----MAX-ERROR--"err-cnt-.-------.-"-.-><  
    .-/-+ |                         .-svrty-+   | 
          .-NO--MAX-ERROR-----------------------+ 
 
Parameters:
err-cnt The maximum number of errors
svrty The minimum level of severity to be counted. Only messages of the severity specified and greater are counted. One of:
F Flag
I Informational
W Warning
E Error
S Severity

If omitted, assumes F.

Properties:
Default: NOMAX-ERROR
Phase: Syntax check
$SET: Any
Comments:

The Compiler also accepts the directive-name without a hyphen; that is MAXERROR.

If the maximum number of messages of at least the specified severity is reached then the compilation stops. The messages are only counted if produced and after any modification to the severity of the message.

Example:

Specifying the directive:

MAX-ERROR"100 E"

causes the compilation to terminate when 101 messages of severity E or S have been produced.

See Also:

CHANGE-MESSAGE Compiler directive
FLAG Compiler directive
FLAGAS Compiler directive
FLAGSTD Compiler directive
HIDE-MESSAGE Compiler directive
WARNING Compiler directive


MF

Facilitates forward compatibility with Micro Focus COBOL systems by selectively enabling Micro Focus-specific reserved words and changing the behavior of certain features to be compatible with particular versions.

Syntax:
 >>-.---.-.-------.-MF------.-"integer"-.---><  
    .-/-+ |       .-MFLEVEL-+           | 
          ..----.-.-MF------.-----------+ 
           .-NO-+ .-MFLEVEL-+
Parameters:
integer The level of Micro Focus COBOL to be compatible with.
Properties:
Default: MF"10"
Phase: Syntax check
$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".

Comments:

The possible values of integer are:

1 Professional COBOL V1.0, V1.1, and V1.2
Level II COBOL V2.5 and V2.6
Level II COBOL/ET V1.1
2 VS COBOL Workbench V1.2
VS COBOL V1.2
3 VS COBOL Workbench V1.3
VS COBOL Workbench V2.0
Professional COBOL V2.0
VS COBOL V1.5
4 COBOL/2 V1.1
Professional COBOL/2
COBOL/2 Workbench V2.2
Microsoft COBOL V3.0
5 COBOL/2 V1.2
COBOL/2 Workbench V2.3
6 COBOL/2 V2.4
COBOL/2 Workbench V2.4
Microsoft COBOL V4.0
7 COBOL/2 V2.5
COBOL/2 Workbench V2.5
Microsoft COBOL V4.5
8 COBOL V3.0
COBOL Workbench V3.0
Microsoft COBOL V5.0
9 COBOL V3.1
COBOL Workbench V3.1
10 COBOL V3.1 with Early Release Syntax enabled
COBOL Workbench V3.1 with Early Release Syntax enabled
COBOL V3.2 and V3.3
COBOL Workbench V3.2 and V3.3
Object COBOL V3.2 and V3.3
COBOL V4.0 (UNIX)
11 COBOL V3
V4.0 (UNIX) with Early Release Syntax enabled

Behavior of the BLANK LINE phrase in previous versions of this COBOL system can be implemented using the OLDBLANKLINE directive. Behavior of the NEXT SENTENCE phrase in previous versions of this COBOL system can be implemented using the OLDNEXTSENTENCE directive.

MF"11" contains all reserved words in MF"10" together with those that are part of the Early Release syntax. Specifying MF without a parameter sets MF"11" if the EARLY-RELEASE directive has already been set. Otherwise, it sets MF"10". It is not possible to set MF"11" unless EARLY-RELEASE has already been set.

See Also:

EARLY-RELEASE Compiler directive
OLDBLANKLINE Compiler directive
OLDNEXTSENTENCE Compiler directive


MFCOMMENT

Treats lines with an asterisk (*) in column 1 the same as comment lines but does not show them in the source listing.

Syntax:
 >>-.---.-.----.--MFCOMMENT-----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: MFCOMMENT
Phase: Syntax check
$SET: Any
Dependencies:

Set to NOMFCOMMENT at end by SOURCEFORMAT"FREE".

Comments:

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.


MOVE-LEN-CHECK

Causes the compiler to check source and target lengths for alphanumeric MOVE operations.

Syntax:
 >>-.---.--.----.-----MOVE-LEN-CHECK------><
    .-/-+  .-NO-+
Properties:
Default: NOMOVE-LEN-CHECK
Phase: Syntax check
$SET: Any
Comments:

This directive causes the compiler to check source and target lengths for alphanumeric MOVE operations and issues a warning message (166) if they are different.

Any warning messages produced by enabling this directive are only visible if WARNINGS"2" or WARNINGS"3" is selected.

See Also:

WARNINGS Compiler directive.


MS

Facilitates forward compatibility with Microsoft COBOL systems by selectively enabling Microsoft-specific reserved words and changing the behavior of certain features to be compatible with particular versions.

Syntax:
 >>-.---.-.-------MS--"version"-.-----------><  
    .-/-+ ..----.-MS------------+ 
           .-NO-+
Parameters:
version Must be 1 or 2.
Properties:
Default: NOMS
Phase: Syntax check
$SET: Initial
Dependencies:

MS sets DEFAULTBYTE"0" and ACCEPTREFRESH immediately.

Comments:

The possible values of version are:

1 Microsoft COBOL Version 1.
2 Microsoft COBOL Version 2.

Specifying MS with no parameters is the same as specifying MS"2". MS"1" is identical to IBM-MS and PC1.

This directive is for compatibility with Microsoft COBOL before version 3.0. For compatibility with V3.0 and later, use:

NOMS MF"integer"

The value of integer to use is shown in the description of the MF directive.

See Also:

MF Compiler directive


NATIVE

Specifies the default collating sequence for comparisons.

Syntax:
 >>-.---.--NATIVE--"coll-seq"---------------><  
    .-/-+
Parameters:
coll-seq Either "ASCII" or "EBCDIC".
Properties:
Default: NATIVE"ASCII"
Phase: Syntax check
$SET: Initial
Dependencies:

Set to NATIVE"ASCII" immediately by CHARSET"ASCII".
Set to NATIVE"EBCDIC" at end by CHARSET"EBCDIC".

Comments:

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.


NCHAR

Enables the use of Micro Focus Double-byte Language Extension (PIC N, Japanese data-names and Japanese procedure-names).

Syntax:
 >>-.---.-.-------NCHAR--"integer"-.--------><  
    .-/-+ ..----.-NCHAR------------+ 
           .-NO-+
Parameters:
integer Must be 1 or 2. The level of support required.
Properties:
Default: NONCHAR
Phase: Syntax check
$SET: Initial
Comments:

The possible values of integer are:

1 Compatibility with previous versions of Nihongo Micro Focus products
2 Enhanced PIC N support. This setting enables the DBSPACE directive.

Specifying NCHAR with no parameter is the same as specifying NCHAR"2".

This directive is synonymous with, and should be used in preference to, the JAPANESE directive.

The NCHAR and DBCS directives are mutually exclusive.

When a PIC X is moved to a PIC N, with NCHAR"2", a space (x"20") is expanded to one double-byte space, and so x"2020" is expanded to two double-byte spaces. With NCHAR"1", x"2020" is expanded to one double-byte space.

See Also:

DBCS Compiler directive
DBSPACE Compiler directive
JAPANESE Compiler directive


NESTLOCALSTORAGE

This directive is reserved for internal use by this COBOL system. Because it might appear in the list of settings, it is included for completeness. It is not intended for your use, and its setting should not be changed.

Allows Local-Storage Section in nested programs.

Syntax:
 >>-.---.-.----.--NESTLOCALSTORAGE----------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NONESTLOCALSTORAGE
Phase: Syntax check
$SET: Initial

NLS

Enables the National Language Support facility.

Syntax:
 >>-.---.-.----.--NLS-----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NONLS
Phase: Syntax check
$SET: No
Comments:

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:

The chapter Internationalization Support in your Programmer's Guide to Writing Programs.


ODOOSVS

Makes the evaluation of OCCURS DEPENDING ON items more compatible with the OS/VS COBOL compiler.

Syntax:
 >>-.---.-.----.--ODOOSVS-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOODOOSVS
Phase: Syntax check
$SET: Initial
Dependencies:

ODOOSVS sets ODOSLIDE at end.

Comments:

When ODOOSVS is specified, the length of variable-length groups and the address of items following variable-length tables is evaluated at the time when the OCCURS DEPENDING ON item is modified, rather than at the time when the variable-length group or sliding data item is referenced.


ODOSLIDE

Moves data items that follow a variable-length table in the same record as the table's length changes.

Syntax:
 >>-.---.-.----.--ODOSLIDE------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOODOSLIDE
Phase: Syntax check
$SET: Initial
Dependencies:

Set to ODOSLIDE at end by ODOOSVS.

Comments:

This affects data items that appear after a variable-length table in the same record; that is, after an item with an OCCURS DEPENDING clause, but not subordinate to it.

With ODOSLIDE, these items always immediately follow the table, whatever its current size; this means their addresses change as the table's size changes. With NOODOSLIDE, these items have fixed addresses, and begin after the end of the space allocated for the table at its maximum length.


OLDBLANKLINE

Changes the behavior of the BLANK LINE clause in the Screen Section.

Syntax:
 >>-.---.-.----.--OLDBLANKLINE--------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOOLDBLANKLINE
Phase: Syntax check
$SET: Any
Comments:

When OLDBLANKLINE is specified, the BLANK LINE clause behaves exactly the same as ERASE EOL; that is all characters to the right of the cursor are deleted.

With NOOLDBLANKLINE specified, the BLANK LINE clause causes the whole line to be deleted.


OLDCOPY

Makes COPY statements follow the ANSI'68 Standard.

Syntax:
 >>-.---.-.----.--OLDCOPY-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOOLDCOPY
Phase: Syntax check
$SET: Any

OLDFILEIO

This directive is reserved for internal use by this COBOL system. Because it might appear in the list of settings, it is included here for completeness. It is not intended for your use, and its setting should not be changed.

Syntax:
 >>-.---.-.----.--OLDFILEIO-----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOOLDFILEIO
Phase: Syntax check
$SET: Initial

OLDINDEX

Causes indexes to be compiled as subscripts.

Syntax:
 >>-.---.-.----.--OLDINDEX------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOOLDINDEX
Phase: Syntax check
$SET: Initial
Dependencies:

Set to NOOLDINDEX immediately by NORM.
Set to OLDINDEX immediately by RM and RM"ANSI".

Comments:

This directive is for compatibility with earlier products.


OLDNEXTSENTENCE

Changes the behavior of the NEXT SENTENCE statement.

Syntax:
 >>-.---.-.----.--OLDNEXTSENTENCE-----------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOOLDNEXTSENTENCE
Phase: Syntax check
$SET: Any
Comments:

When OLDNEXTSENTENCE is specified, the NEXT SENTENCE statement behaves like a CONTINUE statement.

For more details on CONTINUE and NEXT SENTENCE, see your Language Reference.

See Also:

CONTINUE statement


OLDREADINTO

Changes the behavior of the READ ... INTO statement.

Syntax:
 >>-.---.-.----.--OLDREADINTO---------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOOLDREADINTO
Phase: Syntax check
$SET: Any
Comments:

When OLDREADINTO is specified, the implicit move from the file's record area to the data item specified in the INTO phrase is executed even when the READ is not successful. If NOOLDREADINTO is specified, the MOVE only happens if the READ is successful.


OLDSTRMIX

Allows PIC X and PIC N fields to be specified in the same STRING, UNSTRING, or INSPECT statement.

Syntax:
 >>-.---.-.----.--OLDSTRMIX---------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOOLDSTRMIX
Phase: Syntax check
$SET: Any
Comments:

This directive is provided for forward compatibility only.

We recommend that you do not use it as it can lead to unexpected results and the corruption of double-byte data.


OOCTRL

Enables you to change language options when compiling Object COBOL classes.

Syntax:
                       +---------------.    
                       |               | 
>>----.---.---OOCTRL---.-switch-option-.------><
      .-/-+                
Parameters:
switch Turns option on or off.
option Determines how syntax in OO programs is to be treated.
Properties:
Default: OOCTRL"+F-G-P+Q-W" (All dialects)
Phase: Syntax check
$SET: Any
Comments:

switch can be:

+ Turns option on.
- Turns option off.

option can be:

F Specifies whether or not to fold method names invoked by the program being compiled to lower case. Use -F if your program calls Java methods, since Java method names are case-sensitive. See your Distributed Computing book for information on using Java and COBOL together.
G Specifies whether to make class data global for instances. The use of this option is not recommended. It is provided for compatibility with earlier releases.
P Specifies whether to make parameter type information available to the run-time system. This is needed for messages sent to OLE and SOM.
Q Specifies whether to disable the use of:
  • IN and OF in any place that could possibly follow a data name in the verb-signature of a method interface definition.

  • Any verb in the verb-signature of a method interface definition.
W Specifies whether to use:
  • Working-Storage to mean Object-Storage in instances and class objects.

  • Working-Storage to mean Local-Storage in methods.

When Working-Storage is used to mean Local-Storage or Object-Storage, a Local-Storage Section or Object-Storage Section, respectively, must not be specified.

This provides compatibility with the developing ISO2000 COBOL standard.

Set +W to use the Working-Storage in the same way as that proposed by the developing ISO COBOL standard.


OPT

Specifies the level of optimization of the code produced in the object code file.

Syntax:
>>----.---.---OPT---integer------><
      .-/-+                
Parameters:
integer The level of optimization.
Properties:
Default: OPT"2"
Phase: Generate
$SET: Any
Comments:

integercan be:

1 Minimal optimization
2 Default optimization
3 Additional optimization - particularly of STRING, UNSTRING and INSPECT. This option increases the time taken to generate a program in comparison to the default optimization.
4 Optimized as for option 3, but in addition on Intel platforms the code is scheduled. This option increases the time taken to generate a program in comparison to option 3.

OPTIONAL-FILE

Makes the Compiler treat all files opened for I-O or EXTEND as optional.

Syntax:
 >>-.---.-.----.--OPTIONAL-FILE-------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: OPTIONAL-FILE
Phase: Syntax check
$SET: Initial
Dependencies:

Set to OPTIONAL-FILE immediately by NORM.
Set to NOOPTIONAL-FILE immediately by RM or RM"ANSI".

Comments:

Under ANSI'85 Standard COBOL, a file is treated as optional only if it has the OPTIONAL phrase in its SELECT statement. For compatibility with the ANSI'85 Standard you must specify the NOOPTIONAL-FILE directive.


OSVS

Specifies that words reserved in IBM OS/VS COBOL are to be treated as reserved words.

Syntax:
 >>-.---.-.----.--OSVS----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOOSVS
Phase: Syntax check
$SET: Initial
Dependencies:

OSVS sets NODOSVS immediately.

See Also:

DOSVS Compiler directive


OUTDD

Causes DISPLAY and EXHIBIT statements to write to a specified output file.

Syntax:
 >>-.---.-.--------OUTDD--"fname rsize rtype ctype"-.'"
    .-/-+ .--------OUTDD--"fname rsize rtype"-------|
          .--------OUTDD--"fname rsize"-------------|
          .--------OUTDD--"fname"-------------------|
          .-.----.-OUTDD----------------------------+ 
            .-NO-+
Parameters:
fname Name of file to be written for the specified DISPLAY statements and EXHIBIT statements. The default is SYSOUT.
rsize Size of the data records in the file. The default is 132.
rtype Either L for line sequential or R for record sequential. The default is L.
ctype Either A for ASCII or E for EBCDIC. The default is A.

E only has effect when the CHARSET(EBCDIC) directive is used.

Properties:
Default: NOOUTDD
Phase: Syntax check
$SET: Initial
Comments:

When OUTDD is specified, all format 1 DISPLAY statements which either have no UPON option or specify UPON SYSOUT, and all EXHIBIT statements are transformed into WRITE statements, writing to a file with the specified external filename.

The filename can be mapped onto physical filenames in the same way as other files with external filenames; that is, by using environment variables or the External File Mapper, MFExtmap.

See Also:

DISPLAY statement
EXHIBIT statement
INDD Compiler directive


OVERRIDE

Replaces a reserved word by a new one.

Syntax:
             +---------------------------. 
             v                           | 
 >>-OVERRIDE--"rsv-word" = "user-word"----->< 
Parameters:
rsv-word Existing reserved word.
user-word Any COBOL word not the same as an existing reserved word.
Properties:
Default: No change of reserved words takes place.
Phase: Syntax check
$SET: Initial
Comments:

This directive equates an existing reserved word to the specified user-defined word, so that, in the program, user-word is treated as a reserved word, and rsv-word can be used as a user-defined word.

The equals sign (=) must be surrounded by spaces. You can also leave a space between the directive and its option to improve readability. If you are specifying this directive to the -C option of the Cob command line, you need to ensure that all characters are escaped correctly for the UNIX shell. See the section Option Configuration in the chapter COBOL System Interface (Cob) for details. For example, to specify OVERRIDE on the command line:

cob -C 'override "global" == "glob"' a.cbl

This directive does not appear in the list created with the SETTING directive.


P64

Compiles a program for execution in a 64-bit run-time environment.

Syntax:
 >>-.---.-.----.--P64------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOP64 on 32-bit systems
P64 if compiling with the cob64 command, or if working mode is set to 64.
Phase: Syntax check
$SET: Any
Dependencies:

P64 immediately sets:

RTNCODE-SIZE"8"
INTLEVEL"5"
FCD3

Comments:

If you set the P64 directive, your program is compiled to run under a 64-bit development environment, and to manipulate 64-bit pointers.

See Also:

FCD Compiler directive
INTLEVEL Compiler directive
RTNCODE-SIZE Compiler directive
See the chapter Working in 32-bit and 64-bit Modes for information on the 32-bit and 64-bit working modes.


PANVALET

Allows ++INCLUDE statements in your program.

Syntax:
 >>-.---.-.----.--PANVALET------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOPANVALET
Phase: Syntax check
$SET: Any
Comments:

The ++INCLUDE statement specifies a file for inclusion in the source program. The string ++INCLUDE must be written as a contiguous sequence of upper-case characters starting in Area A or Area B, 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 ++INCLUDE statement appears.

If you specify PANVALET and LIBRARIAN together, a warning message is given advising that the compiled program might not be mainframe-compatible.


PARAMCOUNTCHECK

Enables the program to be called with fewer parameters than are specified in the relevant entry-point's USING clause.

Syntax:
 >>-.---.-.----.--PARAMCOUNTCHECK-----------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: PARAMCOUNTCHECK
Phase: Generate
$SET: Initial
Dependencies:

Set to PARAMCOUNTCHECK by CHECK.

Comments:

You must use this directive if any of the following apply:

Otherwise the program can be compiled with NOPARAMCOUNTCHECK for efficiency. A program to be called from a language other than COBOL must be compiled with NOPARAMCOUNTCHECK.

See Also:

CHECK Compiler directive
LINKCHECK Compiler directive
STICKY-LINKAGE Compiler directive


PC1

Specifies that words reserved in IBM COBOL V1.00 are to be regarded as reserved words, and changes the behavior of certain features to be compatible with that COBOL system.

Syntax:
 >>-.---.-.----.--PC1-----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOPC1
Phase: Syntax check
$SET: Initial
Dependencies:

PC1 sets DEFAULTBYTE"0" and ACCEPTREFRESH immediately.

Comments:

This directive is synonymous with the IBM-MS and MS"1" directives.


PERFORM-TYPE

Specifies the behavior of return jumps from nested PERFORM statements.

Syntax:
 >>-.---.--PERFORM-TYPE--"dialect"----------><  
    .-/-+
Parameters:
dialect MF, OSVS, or RM.
Properties:
Default: PERFORM-TYPE"MF"
Phase: Syntax check
$SET: Initial
Dependencies:

PERFORM-TYPE"OSVS" sets TRICKLE at end.

Comments:

The possible values of dialect are:

MF Only the exit point of the innermost PERFORM currently being executed is recognized and its return jump taken.
OSVS The exit point of any PERFORM statement currently being executed is recognized if reached; the return jump taken is the first reached. PERFORM statements with the same exit point can be nested to a depth of two (one inner and one outer). If they are nested deeper, they do not return correctly. The end of a section is regarded as the same point as the end of its last paragraph.

PERFORM-TYPE"OSVS" provides compatibility with the mainframe behavior of OS/VS COBOL, DOS/VS COBOL, VS COBOL II and COBOL/370.

RM The exit point of any PERFORM statement currently being executed is recognized if reached; the return jump taken is the first reached. PERFORM statements with the same exit point cannot be nested; if they are they do not return correctly. The end of a section is regarded as a separate point from the end of its last paragraph.
See Also:

STICKY-PERFORM Compiler directive


PERFORMOPT

Specifies that the Compiler should not generate code for PERFORM statements that reference empty paragraphs.

Syntax:
 >>-.---.-.----.-PERFORMOPT---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: PERFORMOPT
Phase: Generate
$SET: Initial
Comments:

For greatest efficiency the Compiler normally does not generate code for a PERFORM statement that references an empty paragraph. If you require the code to be left in, for example for timing purposes, specify NOPERFORMOPT.


PREPLIST

Causes the list file produced during a compilation to show both the original and modified source created by the preprocessor as well as to show all data passed to the Compiler by a preprocessor.

Syntax:
 >>-.---.-.----.--PREPLIST------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOPREPLIST
Phase: Syntax check
$SET: No
Comments:

This directive is provided as a debugging aid to preprocessor writers.

This directive only affects what the listing file, if produced, contains. It does not determine if a listing file is produced, or the name of the file.


PREPROCESS

Makes the Compiler take the source program from a preprocessor instead of a source file.

Syntax:
 >>-.---..----.-PREPROCESS-.-"name".------..------.-.-->< 
    .-/-+|    .-P----------+       .-dirs-+.-ENDP-+ |
         .-NO-.-PREPROCESS-.------------------------+
              .-P----------+
Parameters:
name The preprocessor to use.
dirs Directives to be passed directly to the preprocessor.
Properties:
Default: NOPREPROCESS
Phase: Syntax check
$SET: On very first source line only
No (with NOPREPROCESS)
Comments:

This directive informs the Compiler that an integrated preprocessor is to be used.

For more information on using this directive, see the chapter Integrated Preprocessor Interface in your Programmer's Guide to Writing Programs.

A $SET statement is processed by both the compiler and the preprocessor. Furthermore, if the PREPROCESS directive is set in a $SET statement, the directive only takes effect after the entire $SET statement has been processed. If the $SET statement contains other directives there might be incompatibilities when the preprocessor parses the source a second time. In particular, the SOURCEFORMAT directive might cause the compiler to interpret the source as fixed format while the preprocessor might view it as free format, or vice-versa. If you specify the PREPROCESS Compiler directive in a $SET statement, you should, therefore, ensure that the $SET statement only contains the PREPROCESS directive. If you want to set other directives, use separate $SET statements on following lines.

You are advised to use the ENDP COBOL directive to terminate the directives to pass to the preprocessor. Directives placed after ENDP pass to the COBOL Compiler. Therefore, without the ENDP directive, Compiler directives might continue to pass to the preprocessor rather than to the COBOL compiler.

If you are sending directives to the COBSQL preprocessor, use END-C to distinguish the directives to pass to COBSQL and the directives to pass to the precompiler. For example, in the command line below, directives placed before END-C pass to COBSQL while directives placed between END-C and ENDP pass via COBSQL to the precompiler:

 preprocess(cobsql) csqltype=oracle end-c comp5=yes endp; 

For more information on COBSQL, refer to the Database Access book.


PRINT

Specifies the destination of the source listing file.

Syntax:
 >>-.---.-.-------PRINT-.-"destination"-.-.--><  
    .-/-+ |             .-()------------+ | 
          ..----.-PRINT-------------------+ 
           .-NO-+
Parameters:
destination A full file specification, or a device-name.
Properties:
Default: NOPRINT
Phase: Syntax check
$SET: Any
Comments:

PRINT is synonymous with LIST. All rules that apply to LIST also apply to PRINT.

See Also:

LIST Compiler directive


PRINT-EXT

Specifies the extension to be added to the filename associated with the ASSIGN TO PRINTER clause.

Syntax:
 >>-.---.--PRINT-EXT--"extension"-----------><  
    .-/-+
Parameters:
extension The extension to be added.
Properties:
Default: No extension is added
Phase: Syntax check
$SET: Any
Comments:

This directive is ignored unless ASSIGN-PRINTER() is specified with no filename.

See Also:

ASSIGN-PRINTER Compiler directive


PROFILE

Includes code in your program to produce detailed performance statistics each time you run the program.

Syntax:
 >>-.---.-.----.--PROFILE-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOPROFILE
Phase: Syntax check
$SET: No

PROGID-COMMENT

Allows comments following the PROGRAM-ID in the Program-Id paragraph.

Syntax:
 >>-.---.-.----.--PROGID-COMMENT------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOPROGID-COMMENT
Phase: Syntax check
$SET: Initial
Comments:

This directive is provided for compatibility with earlier versions of this COBOL system.


PROTECT-LINKAGE

Extends the standard COBOL semantics so that the lengths of parameters can differ between the calling and the called program.

Normally, the result of ignoring the constraints would give undefined results, possibly including severe errors such as protection violations or memory access faults.

Syntax:
 >>-.---.-.----.--PROTECT-LINKAGE-----------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOPROTECT-LINKAGE
Phase: Syntax check
$SET: Initial
Comments:

The ANSI COBOL standard states in the general rules for each parameter passed by the CALL statement that "The description of the data item in the called program must describe the same number of character positions as described by the description of the corresponding data item in the calling program." This restriction must be observed when using this COBOL system unless the program is compiled with the PROTECT-LINKAGE directive.

The restriction is lifted when the PROTECT-LINKAGE directive is set. The called program only uses mismatched parameters as sending items in a statement and does not use them as receiving items.

Any character positions in a parameter for which there is no correspondence in the called and calling programs is a mismatched character. The contents of any mismatched character is undefined for a parameter used as a sending item in a called program.

Using this directive affects the performance of your application.

Example:

Calling program:

     ... 
     03 x1  pic x. 
     03 x2  pic x(100). 
 procedure division. 
      ... 
     call subprog using x1 
      ...

Subprogram:

$set protect-linkage 
 working-storage section. 
 01  y1       pic x(1000). 
 
 linkage section. 
 01  z1       pic x(1000). 
 
 procedure division using z1. 
 
     move z1 to y1 
* This operation works, and transfers the contents of x1. 
* It also transfers any data following x1 in the calling 
* program, up to 1000 bytes or the end of allocated memory, 
* whichever occurs first. If less than 1000 bytes is 
* transferred, the remainder of y1 is space filled. 
 
     move y1 to z1. 
* This operation is not protected and fails, either by 
* corrupting data beyond x1 in the calling program, or 
* trying to write beyond allocated memory, which might 
* result in a protection violation.

PROTOTYPE

Enables relaxed or strict checking of call prototypes for COMP, BINARY, COMP-4, COMP-5 and COMP-X data items when used in the BY VALUE or RETURNING clauses of a CALL statement. It also inhibits or enables the implicit copying of parameter types from the prototype.

Syntax:
>>----.---.-----PROTOTYPE----"level"---------------------><
      .-/-+
Parameters:
level STRICT, RELAXED or NORMAL
Properties:
Default: PROTOTYPE"RELAXED"
Phase: Syntax check
$SET: Any
Comments:

The PROTOTYPE directive gives you control over how calls to call prototypes are handled. The options are:

RELAXED Data-items and parameter attributes are loosely checked against the prototype
NORMAL Data-items are strictly checked against the protoype, while parameter attributes are loosely checked
STRICT Data-items and parameter attributes are strictly checked against the protoype

PROTOTYPE"RELAXED" can be particularly useful when you compile programs written on 32-bit systems that use call prototypes written on 64-bit systems.

By default, BY VALUE binary data-items are loosely type-checked (that is PROTOTYPE"RELAXED" is set). For example, a CALL statement can provide a PIC X(2) COMP data-item in its USING list, and that item can correspond to a PIC X(n) COMP data-item in a call prototype, where n can be from 1 to 4 on a 32-bit system, and 1 to 8 on a 64-bit system. If the value passed was larger than that specified for the receiving data item, truncation occurs. If you want to avoid truncation due to this loose type-checking, set PROTOTYPE"NORMAL"or PROTOTYPE"STRICT" when compiling your program.

If you set PROTOYPE"NORMAL" or PROTOTYPE"RELAXED", the attributes for the parameters of a call are copied from the prototype. If you set PROTOYPE"STRICT", this does not happen. For example, suppose you have the program:

program-id. prog1 is external.
entry call-conv "my_api" by value x1 by reference x2
end program prog1.

program-id. prog2.
call "my_api" by x1 x2   

If you set PROTOYPE"NORMAL", the call to my_api is converted by the Compiler to:

call call-conv "my_api" by value x1 by reference x2

If you set PROTOTYPE"STRICT", the call to my_api is treated as if the parameters followed the normal rules. The call is therefore is converted to:

call "my_api" by reference x1 by reference x2

and the Compiler issues appropriate error messages. Similarly, if the call convention does not match that specified in the prototype, or is not specified to the CALL statement, error messages are issued.

See Also:

For an introduction to call prototypes, see the section Call Prototypes in the chapter Calling Programs in your Programmer's Guide to Writing Programs.

For an example of using call prototypes, see the section CallL Prototypes in the chapter Examples in your Language Reference - Additional Topics.

For information on the syntax required for call prototypes, see your Language Reference.


QUAL

Allows qualified data-names and procedure-names in your program.

Syntax:
 >>-.---.-.----.--QUAL----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: QUAL
Phase: Syntax check
$SET: Any
Comments:

If you have no qualified data-names or procedure-names in your source code, you can specify NOQUAL. This improves compilation speed.

See Also:

QUALPROC Compiler directive


QUALPROC

Allows qualified procedure-names in your program.

Syntax:
 >>-.---.-.----.--QUALPROC------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: QUALPROC
Phase: Syntax check
$SET: Any
Comments:

If you have no qualified procedure-names in your source code, you can specify NOQUALPROC. This improves compilation speed. If you have qualified data-names but no qualified procedure-names, you should specify QUAL and NOQUALPROC.

See Also:

QUAL Compiler directive


QUERY

Makes the Compiler ask what it should do each time it is unable to find a copyfile.

Syntax:
 >>-.---.-.----.--QUERY---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOQUERY
Phase: Syntax check
$SET: Any
Comments:

With QUERY, if the Compiler cannot find a copyfile it asks you whether to terminate the compilation, try the search again, produce an error message and continue, or try again with an alternative path specified by you.

With NOQUERY, the Compiler simply produces an error message and continues.


QUOTE

Makes the Compiler interpret the figurative constant QUOTE as the double-quote character (").

Syntax:
 >>-.---.--QUOTE----------------------------><  
    .-/-+
Parameters:

None

Properties:
Default: QUOTE
Phase: Syntax check
$SET: Any
Comments:

The opposite of this directive is the directive APOST which causes the single-quote character to be used.


RAWLIST

Prevents changeable information, such as page headers, date, time, Compiler release level, from being included in any listing file produced.

Syntax:
 >>-.---.-.----.--RAWLIST-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NORAWLIST
Phase: Syntax check
$SET: Any
Comments:

Specifying this directive does not affect whether a listing is produced or the name of the listing file.

See Also:

LIST Compiler directive


RDW

Enables you to find out the length of a record that has just been read from a variable-length sequential file.

Syntax:
 >>-.---.-.----.--RDW-----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NORDW
Phase: Syntax check
$SET: Any
Comments:

If you specify the RDW directive, a four-byte record-length field is allocated immediately before the record area for the file. After a READ, the length (in binary) of the record just read is put in the first two bytes of this record area. The length returned includes the record-length field itself, so is four bytes longer than the actual record length.

You can access this field by defining the record area as a table, and using negative or zero subscripts.

The RDW directive is intended only for mainframe compatibility; for new programs you should use the RECORD IS VARYING DEPENDING ON phrase of the FD statement.

Example:
 fd  file-1. 
 01  rec-1           pic x(100). 
 01  rec-2. 
     03  rdw-table   pic x(4) occurs 25. 
 Working-storage section. 
 01  rdw-area. 
     03  rec-length  pic 9(4) comp. 
     03  filler      pic 9(4) comp.
 procedure division. 
     ... 
     read file-1 
     move rdw-table (0) to rdw-area 
     ...
See Also:

FD statement


RECMODE

Specifies the default format of files.

Syntax:
 >>-.---.--RECMODE--"format"----------------><  
    .-/-+
Parameters:
format F, V, or OSVS.
Properties:
Default: RECMODE"F"
Phase: Syntax check
$SET: Initial
Comments:

The possible values of format are:

F Fixed length record format.
V Variable length record format.
OSVS Fixed or variable depending on a file's record definitions. If all record definitions for the file have the same length and are fixed length, the file is fixed-length record format. Otherwise it is variable-length record format.

This setting is compatible with OS/VS COBOL and DOS/VS COBOL. When compiled with their CMPR2 directive, both VS COBOL II COBOL/370 are also compatible with RECMODE"OSVS".

VSC23 Fixed or variable length depending on the file's record definitions. If all record definitions for the file are the same length, and are fixed length and/or the FD entry has a RECORD CONTAINS x CHARACTERS clause, the file is fixed-length record format. Otherwise it is variable-length record format. This setting is compatible with VS COBOL II and COBOL/370 when compiled with NOCMPR2.

For an individual file this directive is overridden if the FD contains either a RECORD IS VARYING phrase (which specifies variable format) or a RECORDING MODE clause.


REENTRANT

Controls reentrancy of a multi-threading program. Any program that is to be reentrant in a multi-threaded application must be compiled with this directive. If REENTRANT is specified, many program areas are dynamically allocated, so that it is safe to have multiple copies of the program running.

Syntax:
 >>-.---.-.-----REENTRANT--"n"-----><  
    .-/-+ .-NO--REENTRANT------------+
Parameters:
n 1 or 2.
Properties:
Default: NOREENTRANT
Phase: Syntax check
$SET: Initial
Comments:

n can be:

1 All compiler-generated temporary work areas are allocated on a per thread basis. All user data and FD file areas allocated in the Environment and Data Divisions will be shared by all threads. It is the responsibility of the programmer to ensure serialisation to the program's data by use of the CBL_ synchronization calls.
2 All user data and FD file areas allocated in the Environment and Data Divisions are allocated on a per thread basis. EXTERNAL data and files will always be shareable by all threads.

Use REENTRANT"1" wherever possible for any program you wish to be reentrant. Use REENTRANT"2" only as the first step towards converting an existing program to be reentrant.

See Also:

SERIAL Compiler directive


REFNO

Makes the Compiler display its internal reference number at the start of a compilation as well as at the bottom of every listing.

Syntax:
 >>-.---.-.----.--REFNO---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOREFNO
Phase: Syntax check
$SET: No

REMAINDER

Enables you to select how the remainder is calculated in a DIVIDE statement.

>>----------REMAINDER---"integer"----><
Parameters:
integer Must be 1 or 2.

Properties:
Default: REMAINDER"2"
Phase: Syntax check
$SET: Initial
Comments:

integer can be set to:

1 The Compiler uses the ANSI 85 algorithm.
2 The Compiler uses an algorithm employing a subsidiary quotient. This subsidiary quotient is signed and is of sufficient size to hold any valid value. All current IBM mainframe compilers use this non-standard algorithm.

REMOVE

Removes words from the reserved word list, so that they can be used as user-defined words.

Syntax:
                  +----------.
                  v          | 
 >>-.---.--REMOVE--"rsv-word"---------------><  
    .-/-+
Parameters:
rsv-word A reserved word.
Properties:
Default: No reserved words are removed.
Phase: Syntax check
$SET: Initial
Comments:

This directive does not appear in the list created with the SETTING directive.


REPORT-LINE

Specifies the maximum length of a Report Writer line.

Syntax:
 >>-.---.-.-----REPORT-LINE--"integer"-.----><  
    .-/-+ .-NO--REPORT-LINE------------+
Parameters:
integer The maximum length, in characters.
Properties:
Default: REPORT-LINE"256"
Phase: Syntax check
$SET: Initial

RESEQ

Makes the Compiler produce line numbers.

Syntax:
 >>-.---.-.----.--RESEQ---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: RESEQ
Phase: Syntax check
$SET: Initial
Dependencies:

Set to RESEQ immediately by XREF.
Set to NORESEQ immediately by SEQCHK.
Set to NORESEQ at end by SOURCEFORMAT"FREE".

Comments:

These are COBOL line sequence numbers, starting at 1 and increasing in increments of 1.


RETRYLOCK

Specifies that when a READ statement finds that a record is locked the read operation is to be retried repeatedly until the record is available.

Syntax:
 >>-.---.-.----.--RETRYLOCK-----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NORETRYLOCK
Phase: Syntax check
$SET: Any
Dependencies:

Set to NORETRYLOCK immediately by NORM.
Set to RETRYLOCK immediately by RM or RM"ANSI".

Comments:

This directive affects a file only if the file has a FILE STATUS item but there is no declarative specifically for that file.


REWRITE-LS

Allows REWRITE statements on line sequential files.

Syntax:
 >>-.---.-.----.--REWRITE-LS----------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: REWRITE-LS
Phase: Syntax check
$SET: No
Comments:

You must make sure that the record you write is the same size as the one it replaces.


RM

Specifies that words reserved in Ryan-McFarland COBOL V2.0 are to be regarded as reserved words, and changes the behavior of certain features to be compatible with that COBOL system.

Syntax:
 >>-.---.-.-------RM--"ANSI"-.--------------><  
    .-/-+ ..----.-RM---------+ 
           .-NO-+
Parameters:
ANSI See Comments.
Properties:
Default: NORM
Phase: Syntax check
$SET: Initial
Dependencies:

RM sets SEQUENTIAL"LINE", NOTRUNC, OLDINDEX, NOOPTIONAL-FILE, RETRYLOCK, COMP-6"1" and ALIGN"2" immediately.
RM"ANSI" sets SEQUENTIAL"RECORD", NOTRUNC, OLDINDEX, NOOPTIONAL-FILE, RETRYLOCK, COMP-6"1" and ALIGN"2" immediately.
NORM sets SEQUENTIAL"RECORD", TRUNC"ANSI", NOOLDINDEX, OPTIONAL-FILE, NORETRYLOCK, COMP-6"2" and ALIGN"8" immediately.

Comments:

With the ANSI parameter these features behave as they do when a program is compiled in that COBOL system with the ANSI switch set. See your Language Reference - Additional Topics for more information on Ryan-McFarland COBOL V2.0.


RTNCODE-SIZE

Specifies the size of the RETURN-CODE special register and its alignment in memory.

Syntax:
 >>-.---.--RTNCODE-SIZE--"integer"----------><  
    .-/-+
Parameters:
integer 2, 4 or 8.
Properties:
Default: RTNCODE-SIZE"4"
Phase: Syntax check
$SET: Initial
Dependencies:

Set to RTNCODE-SIZE"4" immediately by XOPEN.
Set to RTNCODE-SIZE"8" immediately by P64.

Comments:

The possible values of integer are:

2 PIC S9(4) COMP: size 2 bytes, aligned on a two-byte boundary.
4 PIC S9(9) COMP: size 4 bytes, aligned on a four-byte boundary.
8 PIC S9(16) COMP: size 8 bytes, aligned on an eight-byte boundary.

If a program calls a program with a smaller RETURN-CODE set, on return the value from the called program is in the lower bytes of the RETURN-CODE, with the other bytes undefined. For example, if a program with a 4-byte RETURN-CODE calls a program with a 2-byte RETURN-CODE, the lower two bytes of the 8-byte RETURN-CODE are set, while the content of the other bytes is undefined.

If a program calls a program with a larger RETURN-CODE set, on return the lower bytes of the value from the called program are in the RETURN-CODE, with the content of the upper bytes lost. For example, if a program with a 4-byte RETURN-CODE calls a program with an 8-byte RETURN-CODE, the lower four bytes of the 8-byte RETURN-CODE are set, while the content of the other bytes is lost.


RWHARDPAGE

Causes the Report Writer control module to execute a form feed after the last item is been printed on a page, instead of the usual multiple blank lines. This ensures that the paper is positioned correctly ready for a new page.

Syntax:
 >>-.---.-.----.--RWHARDPAGE----------------><  
    .-/-+ .-NO-+
Parameters:

None.

Properties:
Default: NORWHARDPAGE
Phase: Syntax check
$SET: Initial
Comments:

If you use the CODE IS clause with this directive, the 2-character code does not extend all the way to the end of the page.


SAA

Specifies that words reserved under the Systems Application Architecture (SAA) definition of COBOL are to be treated as reserved words.

Syntax:
 >>-.---.-.-------SAA--"level"-.------------><  
    .-/-+ ..----.-SAA----------+ 
           .-NO-+
Parameters:
level An integer specifying the level of SAA support required.
Properties:
Default: NOSAA
Phase: Syntax check
$SET: Initial
Dependencies:

SAA sets DBSPACE and DBCS"2" immediately.
SAA"2" sets ANS85 at end.

Comments:

The possible values of level are:

1 SAA level 1 supported
2 SAA level 2 supported

Specifying SAA with no parameters is the same as specifying SAA"2".


SEG

Turns on COBOL segmentation.

Syntax:
 >>-.---.-.----.--SEG-----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: SEG
Phase: Syntax check
$SET: Initial
Comments:

With NOSEG, the Compiler treats all section numbers in the code as if they were zero. This means that the Compiler ignores segmentation and creates one program with no overlays.


SEQCHK

Makes the Compiler check the sequence numbers in columns 1 through 6 and identify source lines that are out of sequence.

Syntax:
 >>-.---.-.----.--SEQCHK--------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOSEQCHK
Phase: Syntax check
$SET: Any
Dependencies:

SEQCHK sets NORESEQ immediately.
Set to NOSEQCHK at end by SOURCEFORMAT"FREE".


SEQUENTIAL

Specifies the default file type for files defined (implicitly or explicitly) as ORGANIZATION SEQUENTIAL.

Syntax:
 >>-.---.--SEQUENTIAL--"type"---------------><  
    .-/-+
Parameters:
type ADVANCING, ANSI, LINE, or RECORD.
Properties:
Default: SEQUENTIAL"RECORD"
Phase: Syntax check
$SET: Initial
Dependencies:

Set to SEQUENTIAL"RECORD" immediately by NORM or RM"ANSI".
Set to SEQUENTIAL"LINE" immediately by RM.

Comments:

The possible values of type are:

ADVANCING RECORD SEQUENTIAL with LINE ADVANCING.
ANSI ANSI-conforming RECORD SEQUENTIAL.
LINE LINE SEQUENTIAL.
RECORD RECORD SEQUENTIAL (a standard SEQUENTIAL file).

SERIAL

Specifies that the program is to be run in a multi-threaded environment.

Syntax:
 >>---.----.----SERIAL---------><
      .-NO-+
Parameters:

None

Properties:
Default: NOSERIAL
Phase: Generate
$SET: Initial
Comments:

If you specify this directive, thread-checking code is created that enables the run-time system to detect program entry. If this is not the first active COBOL program, the run-time system blocks on program entry until the previous program has exited. This enables COBOL programs to exist safely in a multi-threaded environment. This directive should be used on the first COBOL program to be executed on any given thread.

Note that the thread checking code takes time and is called on every program entry. Programs should only be compiled with this directive if they are going to run in a multi-threaded environment.

See Also:

REENTRANT Compiler directive


SETTING

Makes the Compiler include in the source listing a list of the settings of directives.

Syntax:
 >>-.---.-.-------.-SETTING--.-.----------.-.-><  
    .-/-+ |       .-SETTINGS-+ .-"format"-+ | 
          ..----.-.-SETTING--.--------------+ 
           .-NO-+ .-SETTINGS-+
Parameters:
format The layout of the listing. Only affects the listing given during the syntax check phase.
Properties:
Default: NOSETTING
Phase: Syntax check
$SET: Any
Dependencies:

Set to NOSETTING by NOLIST at end.

Comments:

When used in the check phase, format can be one of:

LINE Lines of directives, each separated from the next by a space.
COL One directive per line.
COL3 Three directives per line in columns.

If format is not specified, LINE is assumed.

A few directives provided only for compatibility with other COBOL systems (for example, COMMIT) are not shown. Also not shown are directives that control code generation, make specific changes to the reserved word list, or are synonymous with other directives.

If the directive is specified other than on a $SET statement, the directives list is produced before processing the program source. If the directive is specified on a $SET statement, the list is produced once all the directives on that statement have been processed. In each case, the list contains the state of each directive at that point.

See Also:

LIST Compiler directive


SHOW-DIR

Makes the Compiler show the contents of directives files in the source listing.

Syntax:
 >>-.---.-.----.--SHOW-DIR------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOSHOW-DIR
Phase: Syntax check
$SET: Any
Comments:

A directives file is the file cobol.dir or a file that appears in a DIRECTIVES or USE directive. For the contents of cobol.dir to appear in the source listing, SHOW-DIR must be specified at the start of cobol.dir, as this file is processed before any other directive.

You can use SHOW-DIR and NOSHOW-DIR selectively so that only parts of the directives file are output to the listing.


SIGN

Specifies whether, for numeric DISPLAY items with included signs, the signs are to be interpreted according to the ASCII or EBCDIC convention.

Syntax:
 >>-.---.--SIGN--"convention"---------------><  
    .-/-+
Parameters:
convention Either ASCII or EBCDIC.
Properties:
Default: SIGN"ASCII"
Phase: Syntax check
$SET: Initial
Dependencies:

Set to SIGN"ASCII" immediately by CHARSET"ASCII".
Set to SIGN"EBCDIC" at end by CHARSET"EBCDIC".


SOURCEFORMAT

Selects free or fixed format for COBOL source.

Syntax:
 >>-.---.--SOURCEFORMAT--"format-type"------><  
    .-/-+
Parameters:
format-type FIXED or FREE. The format of COBOL source.
Properties:
Default: SOURCEFORMAT"FIXED"
Phase: Syntax check
$SET: Any
Dependencies:

SOURCEFORMAT"FREE" sets NOMFCOMMENT, NORESEQ and NOSEQCHK at end.

Comments:

See the Language Reference for details on free and fixed format code.


SPZERO

If a numeric data item of USAGE DISPLAY consists of all space characters, causes the space characters to be treated as zeros.

Syntax:
 >>-.---.-.----.--SPZERO--------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOSPZERO
Phase: Both
$SET: Any
Comments:

With NOSPZERO, space characters in numeric data items give unpredictable results.


SQL

Causes EXEC SQL statements in your program to be replaced by ODBC or OCI run-time calls, depending on the options you specify.

Syntax:
 >>-.---.-.----SQL-.----------------------.-.--><  
    .-/-+ |        |   +-----.---.-----.  | | 
          |        |   |     .-,-+     |  | | 
          |        |   v               |  | | 
          |        .-(.-option=setting-.)-+ | 
          |           |                |    | 
          |           .-NO-option------+    | 
          .-NO-SQL--------------------------+
Parameters:
option One of the SQL options (see below)
setting The setting for the option
Properties:
Default: NOSQL
Phase: Syntax check
$SET: Initial
Comments:

For more information on using the SQL directive, including the options and their settings, see the chapter Open ESQL in your Database Access book.

If you want to have EXEC SQL statements processed as standard EXEC syntax (see your Language Reference for details), you must explicitly specify the directive NOSQL.


SSRANGE

Specifies that, at run time:

>>-.---.-.-SSRANGE-----"integer"--.-->< 
.-/-+ .-NOSSRANGE--------------+
Parameters:
integer The level of SSRANGE support required

Properties:
Default: NOSSRANGE
Phase: Syntax check
$SET: Initial
Dependencies:

Sets BOUND immediately

Comments:

The possible values of integer are:

1 Causes a 153 error to occur at run-time if an attempt is made to use a reference-modified expression with the length having a negative or zero value.

STDERR

Causes error messages to be echoed to STDERR rather than to the console (STDOUT).

Syntax:
 >>-.---.-.----.--STDERR--------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: STDERR
Phase: Syntax check
$SET: Any

STICKY-LINKAGE

Makes parameters to the program remain linked during subsequent calls of the program.

Syntax:
 >>-.---.-.------STICKY-LINKAGE--"integer"-.-><  
    .-/-+ .-NO---STICKY-LINKAGE------------+
Parameters:
integer Either 1 or 2
Properties:
Default: NOSTICKY-LINKAGE
Phase: Syntax check
$SET: Initial
Comments:

The purpose of the COBOL Linkage Section is to provide a linkage between a level 01 or level 77 data item declared in the Linkage Section (a linkage item) and some dynamically specified data item so that they appear to share the same storage area. The linkage is established by one of three means: a CALL statement referencing a program-name, a CALL statement referencing an entry-name or a SET statement. The first mechanism is the standard one specified by ANSI. The other two are COBOL language extensions that are supported by this COBOL system.

In ANSI COBOL, the Linkage Section enables a called program to access the parameters passed to it by a CALL statement. The number of parameters in the USING phrase of the CALL statement must equal the number of parameters in the USING phrase of the PROCEDURE DIVISION header. Any level 01 or level 77 data item in the Linkage Section that does not appear in the USING phrase of the PROCEDURE DIVISION header must not be referenced.

The ENTRY statement is a COBOL language extension that provides an alternative entry point into a program. The ENTRY statement takes a USING phrase in the same way as the PROCEDURE DIVISION header, and, in a similar fashion, linkage items must not be referenced if they do not appear in the USING phrase associated with the entry-name by which the program was invoked.

The SET statement enables a POINTER value that identifies a storage location to be used to link a linkage item. Such a linkage item can then be referenced in order to reference the data held at that storage location.

The following details explain in conceptual terms when linkage items are linked and unlinked.

This COBOL system checks at run time when a linkage item is referenced, to ensure it is linked to a data item. It gives a run-time error if it is not linked to any storage location. To facilitate this check, on each invocation immediately before executing the first statement in the program, all linkage items are first unlinked and then linkage items that have corresponding parameters passed by the calling program are linked. This means that a linkage item in a called program that is linked to a data item by the SET statement does not remain linked on subsequent invocations of the program; the SET statement needs to be executed in each invocation.

Many other COBOL implementations are less rigorous in enforcing the ANSI rules and the STICKY-LINKAGE directive takes a parameter to specify two alternative and less rigorous regimes.

STICKY-LINKAGE"1" specifies that only the linkage items that appear in the USING phrase of the called program are unlinked; other linkage items retain any previous linkage. If the program was called using the program-name this is the USING phrase of the PROCEDURE DIVISION header. Otherwise, this is the USING phrase associated with the entry-point by which the program was invoked.

Under this regime, if the calling program provides insufficient parameters and a reference is made to a linkage item that appears in the USING phrase but has no corresponding parameter in the USING phrase of the CALL statement, a run-time error is still given.

STICKY-LINKAGE"2" specifies that, except when the program is in its initial state at start-up or after it is referenced in a CANCEL statement, no linkage items are unlinked when the program is called. All linkage items retain any linkage established during previous invocations unless the calling program provides a parameter or a SET statement is used to change the linkage.

If STICKY-LINKAGE"2" is used for a called program, it can be called only by a COBOL program.


Note: No particular implementation method is implied in the above paragraphs and indeed, on this COBOL system, emulating the non-ANSI conformant behavior using this directive can have a detrimental effect on program size and execution speed.


Example:

If the following program is compiled without the STICKY-LINKAGE directive and run, a run-time error 203, CALL parameter not supplied, is given after the second CALL statement passes control to "ent" and the DISPLAY statement references two linkage items that do not appear in the USING phrase of ENTRY "ent".

If the program is then compiled with STICKY-LINKAGE"1" and run, execution progresses until it fails again after the third CALL statement passes control to "sub" and the DISPLAY statement references a linkage item that does appear in the USING phrase of the PROCEDURE DIVISION header but has no corresponding parameter passed by the CALL statement.

If the program is compiled with STICKY-LINKAGE"2" and run, the program successfully executes to completion.

 program-id. main. 
 working-storage section. 
 01 param pic x value "a". 
 procedure division. 
     call "sub" using param 
     call "ent" 
     call "sub" 
     stop run. 
 end program main. 
 
 program-id. sub. 
 linkage section. 
 01 link-1 pic x. 
 01 link-2 pic x. 
 procedure division using link-1. 
     set address of link-2 to address of link-1 
     display link-1 link-2 
     exit program. 
 
   entry "ent" 
     display link-1 link-2 
     exit program.
See Also:

PARAMCOUNTCHECK Compiler directive


STICKY-PERFORM

Specifies the behavior of PERFORM statements when a program is reentered.

Syntax:
 >>-.---.-.----.--STICKY-PERFORM------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOSTICKY-PERFORM
Phase: Syntax check
$SET: Initial
Comments:

This directive has an effect only if your program was compiled with either PERFORM-TYPE"OSVS" or PERFORM-TYPE"RM" specified.

If you specified PERFORM-TYPE"OSVS" or PERFORM-TYPE"RM" when compiling, PERFORM statements are implemented by having a storage area, or bucket, associated with each place in the program that can be the end of a PERFORM statement's range. When a PERFORM statement is executed the return address is stored in the bucket, and at the end of the PERFORM statement's range the bucket is read to determine where control should return to and then cleared.

By default, an EXIT PROGRAM statement clears these buckets, so that if the program is reentered, none of the return addresses of the previously executed PERFORM statements remains. Specifying STICKY-PERFORM stops the buckets from being cleared by an EXIT PROGRAM statement. This means that on reentry, the return addresses of all previously executed PERFORM statements remain.

A STOP RUN or CANCEL statement clears the buckets regardless of the setting of this directive.

See Also:

PERFORM-TYPE Compiler directive


SUPFF

Suppresses form-feed characters on the compilation listing if it is sent to the screen.

Syntax:
 >>-.---.-.----.--SUPFF---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: SUPFF
Phase: Syntax check
$SET: Any

SWITCH-TYPE

Makes programmable switches behave in the same way as in the proposed ISO2000 standard.

Syntax:
 >>-.---.--SWITCH-TYPE--"integer"-------------><  
    .-/-+
Parameters:
integer 1, 2 or 3.
Properties:
Default: SWITCH-TYPE"1"
Phase: Syntax check
$SET: Any
Comments:

Set integer to:

1 Server Express behavior
2 ISO2000 behavior
3 Siemens BS2000 COBOL behavior

In the proposed ISO2000 standard, and the Siemens BS2000 COBOL dialect, switches persist and are visible throughout a run-unit. For example, if program A calls program B then any changes to the switches in A are visible when B is called, and any changes made in B are visible in A when control returns to A. If, however, A terminates and B is called, then the changes made by A are lost. The space in which the switches are stored can be regarded as common to all programs in a run-unit; hence changes to the switches are visible to all programs.

In Server Express, and older versions of Micro Focus COBOL, any called subprogram (in this case B) has its own set of COBOL switches independent of any other program. If program A calls program B, program B's switches are set to the same values as A's were at program start - ignoring any changes A might have made to the switches. When control returns to program A, A's switches are exactly the same as they were before program control changed - ignoring any changes B might have made to the switches. B's switches are preserved (unless B is canceled), so that if invoked again its own switches are retain the values set when it called A. In this case, the space in which switches are stored can be regarded as unique to each program.

SWITCH-TYPE"3" supports the Siemens BS2000 COBOL TSW-n and USW-n switches.

You should only use SWITCH-TYPE"3" when the BS2000 add-on is present to provide the necessary run-time support.

See Also:

BS2000 Compiler directive
DIALECT Compiler directive
ISO2000 Compiler directive


SYMBSTART

Sets the number from which the Compiler counts positions in the collating sequence when compiling the SYMBOLIC CHARACTERS clause.

Syntax:
 >>-.---.--SYMBSTART--"integer"-------------><  
    .-/-+
Parameters:
integer The number to be used.
Properties:
Default: SYMBSTART"1"
Phase: Syntax check
$SET: Initial
Comments:

For ANSI conformance use SYMBSTART"1"; for compatibility with previous products use SYMBSTART"0".

Example:

With SYMBSTART"1", the COBOL statement:

symbolic characters bee is 67

declares a symbolic character bee representing "B" since, counting from 1, "B" is the 67th character in the ASCII collating sequence. With SYMBSTART"0", bee represents "C".


TARGET

Tells the Compiler whether it can generate certain instructions available only on certain microprocessors. Use of these instructions increases the speed and slightly reduces the size of the code.

Syntax:
 >>-.---.--TARGET--"processor-id"-----------><  
    .-/-+
Parameters:
processor-id Identifies the processor type
Properties:
Default: TARGET"386"
Phase: Generate
$SET: Initial
Comments:

This directive is only available on Server Express on SCO UNIX.

The possible values of processor-id are:

386 The code executes on 80386, 80486 and Pentium processors.
486 Includes instructions that are available only on 80486 and Pentium processors.
PENTIUM As for "486", but switches on certain optimizations which improve code speed when run on a Pentium processor, at the cost of increased code size. None of these optimizations prevent the code running on a 486.

TERMPAGE

Determines whether the last page of a report file is to be padded with blank lines until it is a full page in length.

Syntax:
 >>-.---.-.----.--TERMPAGE------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: TERMPAGE
Phase: Syntax check
$SET: Initial
Comments:

Specifying TERMPAGE causes the last page of a report to be padded with blank lines until it is a full page in length.

This directive affects any report file for which the PAGE phrase is specified in its Report Description (RD) entry.


TIME

Puts the time at the top of each page of the listing.

Syntax:
 >>-.---.-.----.--TIME----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: TIME
Phase: Syntax check
$SET: No
Comments:

This directive has no effect if NODATE is specified.

See Also:

DATE Compiler directive


TRACE

Enables READY TRACE and RESET TRACE statements.

Syntax:
 >>-.---.-.----.--TRACE---------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:

Default: NOTRACE
Phase: Syntax check
$SET: Initial
Comments:

When TRACE is set, the READY TRACE statement turns on the trace facility at run time. With this facility on, the name of each paragraph or section heading is displayed as it is executed. RESET TRACE turns this facility off. With NOTRACE, the READY TRACE and RESET TRACE statements have no effect.


TRICKLE

Tells the Compiler that the program contains legal but unstructured perform-ranges, and that certain optimizations cannot, therefore, be made.

Syntax:
 >>-.---.-.----.--TRICKLE-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: TRICKLE
Phase: Generate
$SET: Initial
Comments:

Use of the NOTRICKLE directive is not recommended; if you specify it, the behavior of your program might change. NOTRICKLE tells the Compiler that nowhere in the program could control "trickle" from one perform-range into another. Such a program has structured flow of control: it contains no paragraph or section that is entered both by being performed and by control falling into it from the preceding code, and none that is at the end of the range of one PERFORM and in the middle of the range of another PERFORM.

With NOTRICKLE, the Compiler can generate more efficient code for PERFORM statements.


TRUNC

Specifies whether data being stored into a USAGE COMP, USAGE BINARY or USAGE COMP-4 item is to be truncated to the size given by the item's PICTURE clause or to the maximum size the item can hold.

Syntax:
 >>-.---.-.-------TRUNC--"method"-.---------><  
    .-/-+ ..----.-TRUNC-----------+ 
           .-NO-+
Parameters:
method See Comments.
Properties:
Default: TRUNC"ANSI"
Phase: Syntax check
$SET: Initial
Dependencies:

Set to TRUNC"ANSI" immediately by NORM.
Set to NOTRUNC immediately by RM or RM"ANSI".

Comments:

The possible values of this directive are:

TRUNC Truncate in decimal to the number of digits given by the PICTURE clause, on all stores into COMP, BINARY and COMP-4 items.
NOTRUNC Truncate in binary to the capacity of the allocated storage, on all stores into COMP, BINARY and COMP-4 items.
TRUNC"ANSI" Truncate in decimal to the number of digits given by the PICTURE clause, on non-arithmetic stores into COMP, BINARY and COMP-4 items. On arithmetic statements that cause the size error condition and that have no ON SIZE ERROR phrase, the result is undefined.

TRUNCCOPY

Specifies whether to truncate the names of copyfiles and ++INCLUDE files.

Syntax:
 >>-.---.-.----TRUNCCOPY--"integer"-.-------><  
    .-/-+ .-NO-TRUNCCOPY------------+
Parameters:
integer The number of characters to truncate the name of the copyfile to. Value between 8 and 255 inclusive.
Properties:
Default: NOTRUNCCOPY
Phase: Syntax check
$SET: Initial

USE

Makes the Compiler read directives from a file.

Syntax:
 >>-.---.--USE--"filename"------------------><  
    .-/-+
Parameters:
filename A full file specification.
Properties:
Default: Not set
Phase: Syntax check
$SET: Any
Comments:

USE is synonymous with DIRECTIVES. All rules that apply to DIRECTIVES also apply to USE.

See Also:

DIRECTIVES Compiler directive


VERBOSE

Sends messages from the Compiler to the screen.

Syntax:
 >>-.---.-.----.--VERBOSE-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOVERBOSE
Phase: Syntax check
$SET: No
Dependencies:

VERBOSE sets CONFIRM immediately.

Comments:

When VERBOSE is specified, messages concerning accepted directives and the size of code and data areas are displayed on the screen.


VSC2

Specifies that words reserved in IBM VS COBOL II are to be treated as reserved words, and enables selected features for compatibility with a given level of that COBOL system.

Syntax:
 >>-.---.-.-------VSC2--"integer"-.---------><  
    .-/-+ ..----.-VSC2------------+ 
           .-NO-+
Parameters:
integer The level of IBM VS COBOL II to be compatible with.
Properties:
Default: NOVSC2
Phase: Syntax check
$SET: Initial
Dependencies:

If integer > 1, VSC2"integer" sets DBSPACE and DBCS"2" immediately.

If integer > 2, VSC2"integer" sets ANS85 at end.

Comments:

The following table shows the compatibility specified by integer:

integer Compatible with
1 VS COBOL II release 1.0

You should be aware that:

  • No explicit scope delimiter is allowed in a statement without a conditional phrase (for example, AT END or ON SIZE ERROR).

  • The word ALSO in an EVALUATE statement must be omitted.

  • The CLASS and SYMBOLIC CHARACTERS clauses are not allowed.

  • Conditional phrases with NOT (for example NOT AT END, NOT ON SIZE ERROR) are not allowed.
2 VS COBOL II release 2.0
VS COBOL II release 3.x (when compiled with its CMPR2 directive)
VS COBOL II release 4.x (when compiled with its CMPR2 directive)
COBOL/370 V1R1 (when compiled with its CMPR2 directive)

You should be aware that:

  • The CLASS and SYMBOLIC CHARACTERS clauses are not allowed.

  • Conditional phrases with NOT (for example, NOT AT END, NOT ON SIZE ERROR) are not allowed.

  • When used with FLAG"VSC2" it provides similar functionality to VS COBOL II release 2.
3 VS COBOL II release 3.x (when compiled with its NOCMPR2 directive)

You should be aware that:

  • For complete compatibility in this instance, the directive REMOVE"FUNCTION" also should be specified. However, for upward compatibility, we recommend that you do not use FUNCTION as a user-defined word.

  • When used with FLAG"VSC2" it provides similar functionality to VS COBOL II release 3.
4 Synonymous with VSC2"3".

When VSC2 is specified without integer, VSC2"4" is assumed.

ANSI'85 status codes are used when VSC2"3" is selected.

Do not use the NOANS85 directive after VSC2"3"; it turns off some of the ANSI'85 behavior turned on by VSC2"3".


WARNING

Specifies the lowest severity level of errors to report.

Syntax:
 >>-.---.-.----.-WARNING--.-"integer"-.-----><  
    .-/-+ |    .-WARNINGS-+           | 
          .-NO-.-WARNING--.-----------+ 
               .-WARNINGS-+
Parameters:
integer 1, 2 or 3.
Properties:
Default: WARNING"1"
Phase: Syntax check
$SET: Any
Comments:

The possible values of integer are:

1 Only those of level U, S, or E.
2 Only those of level U, S, E, or W.
3 All levels, that is, levels U, S, E, W, and I.

With NOWARNING only those of level U or S are reported.

See Also:

FLAGAS Compiler directive
FLAGCD Compiler directive


WB

This directive is reserved for internal use by this COBOL system. Because it might appear in the list of settings, it is included for completeness. It is not intended for your use, and its setting should not be changed.

Syntax:
 >>-.---.-.----.--WB------------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOWB
Phase: Syntax check
$SET: No
Dependencies:

WB sets ANIM immediately.


WB2

This directive is reserved for internal use by this COBOL system. Because it might appear in the list of settings, it is included for completeness. It is not intended for your use, and its setting should not be changed.

Syntax:
 >>-.---.-.----.--WB2-----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOWB2
Phase: Syntax check
$SET: No

WB3

This directive is reserved for internal use by this COBOL system. Because it might appear in the list of settings, it is included for completeness. It is not intended for your use, and its setting should not be changed.

Syntax:
 >>-.---.-.----.--WB3-----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOWB3
Phase: Syntax check
$SET: No

WRITELOCK

Makes the WRITE and REWRITE statements acquire a record lock when the program is locking multiple records in a shared data file in a multi-user environment.

Syntax:
 >>-.---.-.----.-.-WRITELOCK--.-------------><  
    .-/-+ .-NO-+ .-WRITE-LOCK-+
Parameters:

None

Properties:
Default: NOWRITELOCK
Phase: Syntax check
$SET: Initial
Comments:

This directive is included for compatibility with earlier file sharing products. When writing new programs you should use the relevant locking syntax rather than this directive.


WRITETHROUGH

Specifies that disk writes are not to be buffered.

Syntax:
 >>-.---.-.----.-.-WRITETHROUGH-.-----------><  
    .-/-+ .-NO-+ .-WRITETHRU----+
Parameters:

None

Properties:
Default: NOWRITETHROUGH
Phase: Syntax check
$SET: All
Dependencies:

Requires CALLFH to be set.

Comments:

This directive is reserved for use with add-on products supplied by us. Do not change its setting unless you have an appropriate add-on product..

To specify this directive on an individual file, use $SET statements in your source program, so that the directive is in effect only for that part of the source containing the file's SELECT statement.

When WRITETHROUGH is specified, the system does not buffer disk writes.

Using WRITETHROUGH helps improve the integrity of data files by ensuring that every write operation goes to the disk file straight away, reducing the possibility of losing data if your computer crashes. However, it also bypasses all cacheing and blocking methods, resulting in poorer performance.

See Also:

CALLFH Compiler directive


XOPEN

Specifies that words reserved under the X/Open definition of COBOL are to be treated as reserved words.

Syntax:
 >>-.---.-.-------XOPEN--"level"-.----------><  
    .-/-+ ..----.-XOPEN----------+ 
           .-NO-+
Parameters:
level Must be 3 or 4. The level of the X/Open definition COBOL to be compatible with.
Properties:
Default: NOXOPEN
Phase: Syntax check
$SET: Initial
Dependencies:

XOPEN sets RTNCODE-SIZE"4" immediately.

Comments:

The possible values of level are:

3 Compatible with X/Open Portability Guide 1988 (XPG-3)
4 Compatible with X/Open CAE Specification (XPG-4)

Specifying XOPEN with no parameter is the same as specifying XOPEN"4".

XPG-4 specifies options for several environments. If available, the options are as follows:

See Also:

DBCS Compiler directive
NLS Compiler directive
RTNCODE-SIZE Compiler directive


XREF

Makes the Compiler produce a cross-reference listing.

Syntax:
 >>-.---.-.----.--XREF----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOXREF
Phase: Syntax check
$SET: Initial
Dependencies:

XREF sets RESEQ immediately.
Set to NOXREF at end by NOLIST and RNIM.
On UNIX, to produce the message "*End of cross reference listing" in the cross reference listing you must also specify the verbose compiler option, -v.

Comments:

This directive has no effect if the LIST directive is not specified.

To produce the cross-reference listing the Compiler needs extra work space on the disk. The space needed depends on the number of data items and procedure-names and the number of times they are referenced.

When the XREF directive is specified, extra information is added to the end of the .lst file produced:

Example:

The following is an extract from a .lst file for a simple program:

     1 working-storage section. 
     2 01 a  pic 9(2). 
     3 
     4 procedure division. 
     5 main section. 
     6     move 1 to a 
     7     if a = 1 display "HELLO" end-if 
     8     stop run. 
     ... 
* A                              Numeric DISPLAY 
*          2#      6*      7?                       (X    3)
* 
*               1 data-names 
* 
* MAIN                           Section 
*          5#                                       (X    1)
* 
* 
*               1 procedure-names 
* End of cross reference listing

The cross-referencing information shows that there is one data item, a, of type numeric display, which is defined on line 2, updated on line 6, and tested on line 7. The (X 3) at the end of the line refers to the number of times the data item appears in the cross-reference listing. The procedure-name main also appears in the listing, as a section which is referenced only once.

See Also:

RESEQ Compiler directive


ZEROLENGTHFALSE

Changes the way that class tests involving zero-length items are carried out.

Syntax:
 >>-.---.-.----.--ZEROLENGTHFALSE-----------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOZEROLENGTHFALSE
Phase: Syntax check
$SET: Any
Comments:

When ZEROLENGTHFALSE is set, all comparisons between zero-length group items, and between zero-length items and figurative constants, return false; when it is not set, they all return true.

For conformance to ANSI and SAA you must set ZEROLENGTHFALSE.


ZEROSEQ

Causes leading zeros to appear in the sequence numbers in columns 1 through 6.

Syntax:
 >>-.---.-.----.--ZEROSEQ-------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOZEROSEQ
Phase: Syntax check
$SET: Any
Comments:

NOZEROSEQ suppresses these leading zeros.


ZWB

Affects the operation of comparisons between integer numeric data items of USAGE DISPLAY and alphanumeric literals or figurative constants.

Syntax:
 >>-.---.-.----.--ZWB-----------------------><  
    .-/-+ .-NO-+
Parameters:

None

Properties:
Default: NOZWB
Phase: Syntax check
$SET: Any
Comments:

The ZWB directive affects the range of comparisons that HOST-NUMCOMPARE applies to. With ZWB on, only unsigned comparisons are affected. Otherwise, all comparisons are affected.

See Also:

HOST-NUMCOMPARE Compiler directive


Copyright © 2002 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.