Descriptions of Directives (cont.) [ Micro Focus COBOL System Reference, Volume 2 ] MPE/iX 5.0 Documentation
Micro Focus COBOL System Reference, Volume 2
Descriptions of Directives (cont.)
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:.
Syntax check
Environment:.
All
$SET:.
Initial
Remarks:.
This COMP code produced by the Compiler behaves in a way that is not the
ANSI standard in cases of numeric overflow. You should use this
directive only if you know that your program does not lead to numeric
overflow, or if you want to use the defined (but 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:.
Syntax check
Environment:.
All
$SET:.
Initial
Remarks:.
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:.
Parameters:.
integer Must be 1 or 2.
Default:.
COMP-6"2"
Phase:.
Syntax check
Environment:.
All
$SET:.
Initial
Dependencies:.
RM or ADDRSV"COMP-6" must be set.
Remarks:.
The possible values of integer are:
1 A binary format is used for COMP-6 data, as described in the
appendix 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 chosen dialect or the directive
ADDRSV"COMP-6" is specified.
Example:.
With COMP-6"2" specified:
PIC 99 COMP-6 VALUE 87 is stored in one byte as x"87"
PIC S99 COMP-6 VALUE 87 is stored in two bytes as x"087C"
COMS85
Allows your program to contain syntax introduced in the Communications
Module of the ANS85 COBOL Standard.
Syntax:.
Parameters:.
None
Default:.
NOCOMS85
Phase:.
Syntax check
Environment:.
All
$SET:.
Initial
CONFIRM
Makes the Compiler echo all subsequent directives to the screen.
Syntax:.
Parameters:.
None
Default:.
NOCONFIRM
Phase:.
Both
Environment:.
All (syntax check), 16-bit (generate)
$SET:.
No
Dependencies:.
Set to CONFIRM immediately by VERBOSE
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. Must be zero
or a positive integer.
alphanum-lit Alphanumeric literal. The constant's value.
Default:.
Not set
Phase:.
Syntax check
Environment:.
All
$SET:.
Any
Remarks:.
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 is 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.
CONVERTPTR
Specifies whether POINTER data items can be redefined as PIC 9(9) COMP
data items.
Syntax:.
Parameters:.
None
Default:.
NOCONVERTPTR
Phase:.
Syntax check
Environment:.
All
$SET:.
Initial
Remarks:.
IBM VS COBOL II and COBOL/370 let you use the REDEFINES clause on a
POINTER data item, to redefine it as a PIC 9(9) COMP data item. You can
then perform arithmetic operations on this item, giving the program the
ability to shift the address referred to by a pointer up or down.
If CONVERTPTR is specified, pointers are held in a form that is reversed
with respect to native byte ordering. They are converted to the native
form immediately before any SET ADDRESS OF linkage-item TO pointer
statement, and immediately after any SET pointer TO ADDRESS OF...
statement.
The CONVERTPTR directive has no effect on PROCEDURE-POINTER data items.
Unexpected behavior might occur if the arithmetic carried out causes the
pointer to cross the boundary of a data segment.
CONVERTRET
Causes COMP and COMP-X items specified in CALL...RETURNING and EXIT
PROGRAM...RETURNING phrases to be converted to COMP-5.
Syntax:.
Parameters:.
None
Default:.
NOCONVERTRET
Phase:.
Syntax check
Environment:.
All
$SET:.
Initial
CONVSPACE
Converts double-byte space characters in COBOL source files to
single-byte spaces on input.
Syntax:.
Parameters:.
None
Default:.
CONVSPACE
Phase:.
Syntax check
Environment:.
All
$SET:.
Initial
Dependencies:.
Set to NOCONVSPACE by DBSPACE at end.
COPYEXT
Specifies the file-name extension of the COPY-file that the Compiler is
to look for if a file-name in a COPY statement is specified without an
extension.
Syntax:.
Parameters:.
extension A file-name extension.
Default:.
COPYEXT"cbl,cpy,"
Phase:.
Syntax check
Environment:.
All
$SET:.
Initial
Remarks:.
Up to four extensions can be specified, each extension being up to 10
characters long. An extension of null is used to represent an extension
of spaces.
If you have many COPY statements that do not specify an extension, using
COPYEXT can improve the compilation speed of your program. For example,
if all of your COPY-files have the extension .cpy, specifying
COPYEXT"CPY,CBL" would avoid unnecessary file access attempts.
The behavior of this directive is affected by the setting of the OSEXT
directive. The extension specified by the OSEXT directive overrides the
first extension specified by the COPYEXT directive. For example:
COPYEXT"cpy,cbl,txt"OSEXT"src"
would have the same effect as:
COPYEXT"src,cbl,txt"
See also:.
OSEXT
COPYLBR
Makes the Compiler treat the library specified in a COPY statement as an
.lbr file.
Syntax:.
Parameters:.
None
Default:.
NOCOPYLBR
Phase:.
Syntax check
Environment:.
All
$SET:.
No
Remarks:.
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 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:.
Parameters:.
integer Must be 0 or between 50 and 99.
Default:.
COPYLIST
Phase:.
Syntax check
Environment:.
All
$SET:.
Any
Remarks:.
integer is the number of a COBOL segment. It must be 0 or in the range
50 through 99. If it is not specified, the contents of all COPY-files
are listed. If it is specified, the contents of all COPY-files 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 COPY-files. If a
segment-number is specified with NOCOPYLIST, only COPY-files in that
segment are listed. For example:
COPYLIST"53" List all COPY-files in the first three divisions, the
root segment, and segment 53.
NOCOPYLIST"53" List only COPY-files that are in segment 53.
Whatever the state of this directive, the name of any COPY-file open when
a page heading is output is given in that heading.
CSI
Makes the Compiler produce extra information so that you can use CSI.
Syntax:.
Parameters:.
None
Default:.
NOCSI
Phase:.
Syntax check
Environment:.
All
$SET:.
No
Dependencies:.
CSI sets ANIM at end
Remarks:.
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.
The CSI file has extension .csi. Its location is controlled by the
COBIDY directive.
See also:.
COBIDY
CURRENCY-SIGN
Specifies the currency sign to be recognized in the PICTURE clause.
Syntax:.
Parameters:.
integer ASCII code of the character, in decimal.
Default:.
CURRENCY-SIGN"36" (that is, "$")
Phase:.
Syntax check
Environment:.
All
$SET:.
Initial
Remarks:.
You cannot specify a valid PICTURE clause symbol. See your Language
Reference for a list of these.
CURRENT-DATE
Specifies the format of the date stored in the CURRENT-DATE special
register.
Syntax:.
Parameters:.
date-format Either DDMMYY or MMDDYY.
Default:.
CURRENT-DATE"MMDDYY"
Phase:.
Syntax check
Environment:.
All
$SET:.
Any
Remarks:.
The DDMMYY parameter causes CURRENT-DATE to be stored in European format.
The parameter can be specified in either uppercase or lowercase.
DATACOMPRESS
Specifies the type of data compression to be done on sequential and
indexed files.
Syntax:.
Parameters:.
integer Must be 1. Specifies run-length encoding.
Default:.
NODATACOMPRESS
Phase:.
Syntax check
Environment:.
All
$SET:.
Any
Remarks:.
The only value that can be specified for data compression supported by
this system is is 1. Values in the range 128 through 255 indicate
user-defined compression routines.
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 Extfh file handler. All
indexed files are processed by Extfh. However, if you wish to use data
compression with sequential files, every program referencing those files
must be compiled with the directive CALLFH"EXTFH".
See also:.
CALLFH
DATALIT
Makes the Compiler put literals in the DATA segment of the program rather
than the CODE segment.
Syntax:.
Parameters:.
None
Default:.
DATALIT
Phase:.
Generate
Environment:.
16-bit
$SET:.
Initial
Dependencies:.
Set to NODATALIT at end by OPT"0"
Remarks:.
For segmented programs, specifying NODATALIT gives the advantage of being
able to have literals in the CODE segment so that they can then be
swapped out with the code that references them. There is generally no
advantage in specifying NODATALIT for a non-segmented program. However,
if you are running generated code (.gnt files) under DOS, specifying
NODATALIT lets you discard any unreferenced code segment.
DATE
Puts the date in the DATE-COMPILED paragraph and at the top of each page
of the listing.
Syntax:.
Parameters:.
string An alphanumeric literal.
Default:.
DATE
Phase:.
Syntax check
Environment:.
All
$SET:.
No
Remarks:.
On many computers, the date and time are available from operating system.
They 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 system date or the string you enter appears at the top of
each page of the listing. With NODATE, spaces are used instead.
DBCHECK
Makes the Compiler check that any Double-Byte Character Set (DBCS)
literals only contain valid 16-bit DBCS characters.
Syntax:.
Parameters:.
None
Default:.
NODBCHECK
Phase:.
Syntax check
Environment:.
All
$SET:.
Initial
Remarks:.
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:.
Parameters:.
integer Must be 1, 2 or 3. Indicates which compatibility
required.
Default:.
NODBCS
Phase:.
Syntax check
Environment:.
All
$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"level" where level > 7
Remarks:.
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".
This feature might not be supported by your Compiler.
MPE/iX 5.0 Documentation