Descriptions of Directives [ COBOL/HP-UX Operating Guide for the Series 700 and 800 ] MPE/iX 5.0 Documentation
COBOL/HP-UX Operating Guide for the Series 700 and 800
Descriptions of Directives
Descriptions for all of the Compiler
and Generator directives
appear alphabetically. Each description contains the following entries.
Key.
Syntax:
Shows the syntax of the compiler and generator directives 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 left-to-right. Each diagram starts with right triangle, right
triangle and ends with right triangle, left triangle. Sometimes the
track forks to show alternatives and then joins up again. The length of
a track has no significance.
Parameters for directives are shown in quotation marks, although
parentheses or equals signs can be used instead unless otherwise stated.
When quotation marks are used, the parameter can contain spaces, whereas
no spaces are allowed in a parameter surrounded by parentheses. Remember
that if you use quotation marks or equals signs, you must escape them
using the backslash character (\). For full details on setting
directives see Chapter 3 , Compiling or Chapter 5 , Generating.
Parameters:
Lists and describes valid parameter(s), if any, for the directive.
Default:
Indicates the directive's default setting.
Phase:
Shows whether the directive controls the compiling or generating process
or both.
$SET:
Shows whether you can put the directive on a $SET statement in your
source program; "Initial" in this entry means it is allowed only on an
initial $SET statement.
01SHUFFLE
Changes the addresses of 01-level items in the Working-Storage Section so
that they do not cross 64K segment boundaries.
Syntax:
Parameters:
None
Default:
NO01SHUFFLE
Phase:Compile
$SET:Initial
Specifying 01SHUFFLE results in 01-level items not being contiguous in
memory when the program is loaded. You should not use this directive on
32-bit UNIX environments.
Use of this directive can cause an increase in the size of the data
segment of a program. This directive is not valid for nested programs.
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:
Parameters:
None
Default:
NOACCEPTREFRESH
Phase:
Compile
$SET:
Initial
If you specify ACCEPTREFRESH before an ACCEPT 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:
* if the Screen Section item includes the USING phrase, an implicit
MOVE is generated from the corresponding Working-Storage Section
item
* if the Screen Section item includes the TO phrase the data area is
initialized to spaces. If you specify NOACCEPTREFRESH, the Screen
Section data area is left as it was following the last ACCEPT or
DISPLAY.
ADDSYN
Defines a user-defined reserved word synonymous with an existing reserved
word.
Syntax:
Parameters:
rsv-word Existing reserved-word
user-word Any COBOL word not the same as an existing reserved
word
Default:
No reserved word synonyms are created
Phase:
Compile
$SET:
Initial
The equals sign must be surrounded by spaces.
ADV
No effect.
Syntax:
Parameters:
None
Default:
None
Phase:
Compile
$SET:
Any
This directive is provided for compatibility with other dialects and has
no effect on compilation.
ALIGN
Specifies the memory boundaries on which data items of 01-level or
77-level are aligned.
Syntax:
Parameters:
integer The distance from one 01-level to the next is a
multiple of this
Default:
ALIGN "8"
Phase:
Compile
$SET:
Initial
Data items of 01-level are aligned on byte boundaries that are multiples
of the value given.
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:
Parameters:
integer The number to be used
Default:
ALPHASTART "1"
Phase:
Compile
$SET:
Initial
For 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".
For ANSI conformance use ALPHASTART"1". For compatibility with previous
Micro Focus products, use ALPHASTART"0".
ALTER
Allows ALTER statements in your program.
Syntax:
Parameters:None
Default:
ALTER
Phase:
Compile
$SET:
Initial
If you know there are no ALTER statements in your program, specifying
NOALTER enables the compiler to produce slightly more efficient code.
ANALYZE
Makes the compiler produce extra information so that you can use the
analyzer feature of Advanced Animator.
Syntax:
Parameters:
None
Default:
NOANALYZE
Phase:
Compile
$SET:
No
This directive is reserved for use with add-on products supplied by Micro
Focus. Do not change its setting unless you have an appropriate add-on
product.
Specifying ANALYZE sets ANIM.
ANIM
Makes the compiler produce extra information so that you can use
Animator.
Syntax:
Parameters:
None
Default:
NOANIM
Phase:
Compile
$SET:
No
A file with extension .idy is created. This contains the additional
information needed to animate the program.
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:
Parameters:
SYNTAX Makes the directive affect syntax but not behavior
Default:
ANS85
Phase:
Compile
$SET:
Initial
This directive causes the following behavior changes:
* the I-O status values are those defined in ANSI'85
* the ALPHABETIC class test regards lower case as alphabetic
* control variables in PERFORM operations are initialized in the
order specified by ANSI'85
* MOVEs to a variable-length group item use the maximum length of
the target if the DEPENDING ON item is within the group.
APOST
Makes the compiler interpret the figurative constant QUOTE as the
single-quote character (').
Syntax:
Parameters:
None
Default:
QUOTE
Phase:
Compile
$SET:No
The opposite of this directive is the directive QUOTE which causes the
double-quotation mark character to be used. Once this directive is set
it cannot be overridden by QUOTE.
ARITHMETIC
Specifies how arithmetic expressions are to be evaluated.
Syntax:
Parameters:
arith-type The behavior to adopt
Default:
ARITHMETIC "MF"
Phase:
Compile
$SET:
No
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 file-name when neither EXTERNAL nor DYNAMIC
appear in the SELECT statement.
Syntax:
Parameters:
assign-type EXTERNAL or DYNAMIC. Defines the method
Default:
ASSIGN "DYNAMIC"
Phase:
Compile
$SET:
Initial
For more details, see the section "Fixed File Assignment" in Chapter
12, COBOL File Handling.
ASSIGN-PRINTER
Specifies how to assign the output from an ASSIGN TO PRINTER clause when
the clause does not specify a file-name.
Syntax:
Parameters:
file-name The file to be associated with the ASSIGN TO PRINTER
clause
Default:
NOASSIGN-PRINTER
Phase:
Compile
$SET:
Any
This directive has no effect if you specify a file-name as part of the
ASSIGN TO PRINTER clause.
NOASSIGN-PRINTER causes the output to be sent to the device LST:.
ASSIGN-PRINTER "file-name" causes the output to be directed to the
file-name specified. The file-name can be fully specified, including a
device, path-name, file-name, and extension.
ASSIGN-PRINTER() results in the same behavior as including the following
COBOL statement:
select file-name-1 assign to printer file-name-1
That is, the file-name used in your COBOL program will also be used as
the file-name for your output. If the internal file-name is too long for
your operating system to handle, it will be truncated to the maximum
length the operating system allows. Note that with this parameter you
must use parentheses, not quotation marks. By default, the file-name
does not include an extension, but you can specify an extension by using
the PRINT-EXT directive.
AUTOLOCK
Makes the default locking AUTOMATIC rather than EXCLUSIVE for files
opened I/O or EXTEND in a multi-user environment.
Syntax:
Parameters:
None
Default:
NOAUTOLOCK
Phase:
Compile
$SET:
Initial
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 all NOTE points (for example, when compilation
stops, either because of an error or because it has finished).
Syntax:
Parameters:
None
Default:
NOBELL
Phase:
Both
$SET:
Initial
BOUND
Specifies that on each table access the subscript or index value is to be
checked to ensure it is within the limits defined by the OCCURS clause.
Syntax:
Parameters:
None
Default:
NOBOUND if NOBOUND was specified when compiling. BOUND otherwise
Phase:
Both
$SET:
Initial
BOUNDOPT
Optimizes the code generated for subscripts.
Syntax:
Parameters:
None
Default:
BOUNDOPT
Phase:
Generate
$SET:
No
If you use BOUNDOPT, any digits in an unsigned USAGE DISPLAY or COMP-3
subscript above the size of the table may be ignored. Excess bytes in
binary subscripts may also be ignored. For example, for a table with 50
entries, a PIC 9(3) DISPLAY subscript is treated as PIC 9(2), with the
most significant digit ignored.
You must specify NOBOUNDOPT if a program references beyond the end of a
table or if any offsets that are used make the use of larger subscript
values valid. NOBOUNDOPT is assumed if bound-checking is enabled.
BRIEF
BRIEF Compiler directives Makes the compiler produce error numbers but no
message texts.
Syntax:
Parameters:
None
Default:
NOBRIEF
Phase:
Compile
$SET:
Any
BROWSE
This directive is reserved for use on other environments. Do not change
its setting.
Syntax:
Parameters:
None
Default:
NOBROWSE
Phase:
Compile
$SET:
Any
Specifying BROWSE sets ANIM.
CALLFH
Makes the compiler generate direct calls for all file I/O operations,
using the Callable File Handler interface.
Syntax:
Parameters:
handler-name Root-name of a program to be called to act as the
file handler
Default:
CALLFH"EXTFH"
Phase:
Compile
$SET:
Initial
This directive is reserved for use with add-on products supplied by Micro
Focus. Do not change its setting unless you have an appropriate add-on
product.
If no handler-name is specified, EXTFH, the file handler supplied with
this COBOL system, is assumed.
CALLSORT
Defines the program to be called to handle all SORT and MERGE operations.
Syntax:
Parameters:
sort-name Root-name of a program to be called to process sorts
and merges.
Default:
NOCALLSORT
Phase:
Compile
$SET:
Initial
This directive is reserved for future use. Do not change its setting.
CANCELLBR
Makes the compiler close a .lbr file used as a library in a COPY
statement once that copy operation is complete.
Syntax:
Parameters:
None
Default:
CANCELLBR
Phase:
Compile
$SET:
Any
This directive is reserved for use with add-on products supplied by Micro
Focus. Do not change its setting unless you have an appropriate add-on
product.
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 COPY-file in all open .lbr libraries (last one opened is
searched first) before the current directory.
This directive is relevant only if COPYLBR is on.
You can use NOCANCELLBR on any $SET. Only .lbr libraries referenced in
COPY statements after the $SET are affected. Any left open from previous
COPY statements are only closed if specified again on a COPY statement
following a CANCELLBR directive.
CHARSET
Defines the character set of the environment.
Syntax:
Parameters:
char-set "ASCII" or "EBCDIC"
Default:
CHARSET "ASCII"
Phase:
Compile
$SET:
Initial
This directive is reserved for use with add-on products supplied by Micro
Focus. Do not change its setting unless you have an appropriate add-on
product.
All literals and collating sequences are handled in the character set
specified.
Setting CHARSET"EBCDIC" sets DEFAULTBYTE"0" immediately and, after all
other directives are processed, sets SIGN"EBCDIC" and NATIVE"EBCDIC".
Thus if, for example, you specify:
charset"ebcdic" defaultbyte"1" sign"ascii" native"ascii"
the SIGN and NATIVE directives will be overridden but the DEFAULTBYTE
directive will not.
For current limitations see the documentation for the appropriate add-on
product.
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:
Parameters:
dialect ANSI, OSVS, VSC2 or COBOL370
Default:
CHECKDIV "ANSI"
Phase:
Compile
$SET:
Initial
If you specify CHECKDIV or CHECKDIV "ANSI", the program will continue
with an undefined result if it tries to divide by zero. If you set
NOCHECKDIV, 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 will produce run-time error 48
(Attempt to divide by zero (fatal)). You can disable this error using
the -O Run-Time switch (see Appendix E , Descriptions of Run-Time
Switches for details of this switch). This directive has no effect on
arithmetic statements that use the ON SIZE ERROR phrase.
CHIP
This directive is reserved for use on other environments. Do not change
its setting.
Syntax:
Parameters:
integer Must be 16
Default:
CHIP "16"
Phase:
Compile
$SET:
Initial
In the case of the Intel 80x86 family, the use of CHIP "16" indicates
that the maximum segment addressability is given by 16 bits, and anything
over this size will be split over an addressing boundary. Knowing this,
the compiler can alter certain code structures to avoid potential
crossing boundaries conditions (for example, the internal print buffer
used with REPORT WRITER syntax).
CICS
Allows EXEC CICS statements in your program.
Syntax:
Parameters:
None
Default:
NOCICS
Phase:
Compile
$SET:
No
This directive is reserved for use with add-on products supplied by Micro
Focus. Do not change its setting unless you have an appropriate add-on
product. This is not for use with CICS OS/2.
With CICS, if CICS-CPY is also set, the compiler inserts:
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:
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 1 there is no DFHCOMMAREA
other value 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, you can query the record
during animation. If you intend to animate a program that uses BLL
cells, set this directive on.
CICSOPTIMIZE
Optimizes the handling of CICS BLL cells.
Syntax:
Parameters:
None
Default:
NOCICSOPTIMIZE
Phase:
Compile
$SET:
No
This directive is reserved for use with add-on products supplied by Micro
Focus. Do not change its setting unless you have an appropriate add-on
product.
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.
CICS-CPY
Inserts the statement COPY "CICS.cpy" provided the CICS directive is
specified.
Syntax:
Parameters:
None
Default:
CICS-CPY
Phase:
Compile
$SET:
No
This directive is reserved for use with add-on products supplied by Micro
Focus. Do not change its setting unless you have an appropriate add-on
product.
See also the description of the CICS Compiler directive.
COBIDY
Specifies the path where the Animator information (.idy) file is to be
written.
Syntax:
Parameters:
path-name Path specification
Default:
NOCOBIDY
Phase:
Compile
$SET:
No
If you do not specify a path-name, the path-name 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
file is 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:
Parameters:
integer Must be 1
Default:
NOCOBOL370
Phase:
Compile
$SET:
Initial
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:
Parameters:
None
Default:
NOCOMP
Phase:
Compile
$SET:
Initial
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 non-standard) 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:
Parameters:
integer Must be 1 or 2
Default:
COMP-5 "2"
Phase:
Compile
$SET:
Initial
The possible values of integer are:
1 The sign is dropped. This is the behavior used in
earlier versions of Micro Focus products
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
COMS85
Allows your program to contain syntax introduced in the Communications
Module of the ANS85 COBOL Standard.
Syntax:
Parameters:
None
Default:
NOCOMS85
Phase:
Compile
$SET:
Initial
CONFIRM
Makes the compiler echo all subsequent directives to the screen.
Syntax:
Parameters:
None
Default:
NOCONFIRM
Phase:
Compile
$SET:
No
CONSTANT
Declares a constant for use in the program.
Syntax:
Parameters:
const-name Data-name. The constant's name
numeric-lit Numeric literal. The constant's value
alphanum-lit Alphanumeric literal. The constant's value
Default:
Not set
Phase:
Compile
$SET:
Any
The effect is as if constant-name had been defined in the program in a
78-level. Its value is that given in the parentheses or quotation marks.
If parentheses are used, the constant will be of category numeric; if
quotation marks are used, it will be of category alphanumeric. To
declare several figurative constants using this feature, use the CONSTANT
directive repeatedly.
MPE/iX 5.0 Documentation