IBM VS Cobol II Compiler Options
This section contains information on the IBM VS Cobol II compiler and library.
It contains information on compiler options.
For information on Compiler Directing Statements
check this page out.
Note: The defaults listed with the options below are the VS
COBOL II defaults shipped with the product. They may have been changed by the
installation. The minimum abreviation is the part that is capitialized.
- ADV Option
-
|--------------------------------------|
| >>-----|-ADV---|----------------->< | Default is: ADV
| |-NOADV-| |
|--------------------------------------|
ADV is meaningful only if you use WRITE . . . ADVANCING in your source code.
With ADV in effect, the compiler adds 1 byte to the record length to account
for the printer control character.
ADV conforms to the American National Standard.
Use NOADV if you've already adjusted your record length to include 1 byte for
the printer control character.
- AWO Option
-
|--------------------------------------|
| >>-----|-AWO---|----------------->< | Default is: NOAWO
| |-NOAWO-| |
|--------------------------------------|
With AWO specified, the APPLY WRITE-ONLY clause will be in effect if any file
within the program is physical sequential with blocked V-mode records. The
clause will be in effect even if it was not specified within the program.
- BUFSIZE Option
-
|--------------------------------------|
| >>-----BUFsize(|-nnnnn-|)-------->< | Default is: 4096
| |-nnnK--| |
|--------------------------------------|
nnnnn A decimal number that must be at least 256.
nnnK A decimal number in 1K increments.
Use BUFSIZE to allocate an amount of main storage to the buffer for each
compiler work data set (where 1K = 1024 bytes decimal). Usually, a large
buffer size will enhance the performance of the compiler.
If you use both BUFSIZE and SIZE, the amount allocated to buffers is included
in the amount of main storage available for compilation via the SIZE option.
BUFSIZE cannot exceed the track capacity for the device used, nor can it exceed
the maximum allowed by data management services.
- CMPR2 Option
-
|--------------------------------------|
| >>-----|-CMPR2---|--------------->< | Default is: NOCMPR2
| |-NOCMPR2-| |
|--------------------------------------|
Use CMPR2 when you want the compiler to generate code that is compatible with
code generated by VS COBOL II Release 2. Valid COBOL source programs that
compiled successfully under Release 2 will also compile successfully under
Release 3 with CMPR2 in effect, and will provide compatible results.
Implementation of the ANS '85 standard created some instances where
incompatibilities with Release 2 can occur. Use of the CMPR2 and FLAGMIG
options aid in the migration of programs written for VS COBOL II Release 2 to
the Release 3 level. Appendix C, "Release 2 Compatibility and Migration" in
topic APPENDIX1.3 contains a table of the items that are CMPR2 sensitive and
describes their behavior under CMPR2 and NOCMPR2.
NOCMPR2 conforms to the American National Standard.
- COMPILE Option
-
|--------------------------------------|
| >>-----|-Compile----------|------>< | Default is: NOCOMPILE(S)
| |-NOCompile--------| |
| |-NOCompile(|-W-|)-| |
| |-E-| |
| |-S-| |
|--------------------------------------|
Use the COMPILE option only if you want to force full compilation even in the
presence of serious errors. All diagnostics and object code will be generated.
Note: You should not attempt to execute the object code generated if the
compilation resulted in serious errors--the results could be unpredictable or
an abnormal termination could occur.
Use NOCOMPILE without any subparameter to request a syntax check (only
diagnostics produced, no object code).
Use NOCOMPILE with W, E, or S for conditional full compilation. For meanings
of error codes, see "Compiler-Detected Errors" in topic 5.4. Full compilation
(diagnosis and object code) will stop when the compiler finds an error of the
level you specify (or higher), and only syntax checking will continue.
If you specify an unconditional NOCOMPILE, the following options have no effect
because no object code will be produced:
DECK OFFSET
FDUMP OPTIMIZE
LIST SSRANGE
OBJECT TEST
Note: These options will be listed even though they will have no effect.
- DATA Option
-
|--------------------------------------|
| >>-----DATA(|-24-|)-------------->< | Default is: DATA(31)
| |-31-| |
|--------------------------------------|
When a program is compiled with the RENT option and is to be executed under XA,
the DATA(24|31) option controls whether dynamic storage for data areas such as
Working Storage and FD record areas is acquired from below the 16-megabyte line
or from unrestricted storage.
Use DATA(24) if your dynamic data areas are to be allocated from storage below
16 megabytes. Specify DATA(24) for programs running under XA in 31-bit mode
that are passing data parameters to programs in 24-bit mode. Otherwise the
data may not be addressable by the called program.
Use DATA(31) if your dynamic data areas are to be allocated from unrestricted
storage. Specifying this option can result in the acquisition of storage in
virtual addresses either above or below 16 megabytes. The operating system
generally satisfies the request by providing space in virtual addresses above
16 megabytes, if it is available.
- DBCS Option
-
|--------------------------------------|
| >>-----|-DBCS---|---------------->< | Default is: NODBCS
| |-NODBCS-| |
|--------------------------------------|
Use of DBCS causes the compiler to recognize X'0E' and X'0F' as shift codes for
the double byte portion of a nonnumeric literal.
With DBCS selected, the double byte portion of the literal is syntax checked
and the literal remains category alphanumeric.
DBCS is ignored if either CMPR2 or FLAGSTD is in effect.
NODBCS conforms to the American National Standard.
- DECK Option
-
|--------------------------------------|
| >>-----|-Deck---|---------------->< | Default is: NODECK
| |-NODeck-| |
|--------------------------------------|
Use DECK to produce object code in the form of 80-column card images. If you
use the DECK option, be certain that SYSPUNCH is defined in your JCL for
compilation.
- DUMP Option
-
|--------------------------------------|
| >>-----|-DUmp---|---------------->< | Default is: NODUMP
| |-NODUmp-| |
|--------------------------------------|
Use DUMP to produce a system dump at compile time. This option is not intended
for general use. The DUMP option is only used at the request of an IBM
representative.
The dump, which consists of a listing of the failing program's registers and a
storage dump, is intended primarily for diagnostic personnel when a bug is
discovered in the compiler itself.
For information on how to interpret the user abend code, see VS COBOL II
Application Programming: Debugging. If you use the DUMP option, include a DD
statement at compile time to define SYSABEND, SYSUDUMP, or SYSMDUMP.
With DUMP, the compiler won't issue a diagnostic message before abnormal
termination processing. Instead, a user abend will be issued with an IGYppnnnn
message. In general, a message IGYppnnnn corresponds to a compile-time user
abend nnnn. However, both IGYpp5nnn and IGYpp1nnn messages produce a user
abend of 1nnn. You can usually distinguish whether the message is really a
5nnn or a 1nnn by recompiling with the NODUMP option.
Use NODUMP if you want normal termination processing, including:
Diagnostic messages produced so far in compilation
A description of the error
The name of the compiler phase currently executing
The line number of the COBOL statement being processed when the error
was found
The contents of the general purpose registers.
- DYNAM Option
-
|--------------------------------------|
| >>-----|-DYNam---|--------------->< | Default is: NODYNAM
| |-NODYNam-| |
|--------------------------------------|
Use DYNAM to cause separately compiled programs invoked through the CALL
literal statement to be loaded dynamically at run time. DYNAM causes dynamic
loads (for CALL) and deletes (for CANCEL) of separately compiled programs at
object time. Any CALL identifier statements that cannot be resolved in your
program are also treated as dynamic calls.
When you specify DYNAM, RESIDENT is also put into effect. For information on
the interaction of DYNAM and other compiler options, see "Valid Combinations of
DYNAM, RESIDENT, and RENT" on page 5.2.2.8.31.
DYNAM conforms to the American National Standard.
Note: Do not use DYNAM with CICS.
- EXIT Option
-
|--------------------------------------|
| >>|-EXit(|-INeXit(|---------|mod1-)|-|° Default is: NOEXIT
| | | |-'str1',-| | |
| | |-NOINeXit----------------| |
| |-NOEXit---------------------------|ý
| |
| °>---|-LIBeXit(|---------|mod2-)|----|°
| | |-'str2',-| | |
| |-NOLIBeXit----------------| |
| ý>-----------------------------------|4
| |
| °>---|-PRTeXit(|---------|mod3-)|-)|-|<
| | |-'str3',-| | | |
| |-NOPRTeXit----------------| | |
| 4>---------------------------------| |
|--------------------------------------|
Use the EXIT option to allow the compiler to accept user-supplied modules in
place of SYSIN, SYSLIB (or copy library), and SYSPRINT. Any combination of
exits may be specified. Under CMS, the user-supplied modules must be
relocatable MODULE files.
Note: The EXIT option cannot be specified in a PROCESS (CBL) statement. It
can only be specified at invocation in the PARM field of JCL (under TSO,
specify it in a command argument), or at installation time.
INEXIT(['str1',]mod1)
The compiler reads source code from a user-supplied load module (where
"mod1" is the module name), instead of SYSIN.
LIBEXIT(['str2',]mod2)
The compiler obtains copy code from a user-supplied load module (where
"mod2" is the module name), instead of "library-name" or SYSLIB. For
use with either COPY or BASIS statements.
PRTEXIT(['str3',]mod3)
The compiler passes printer destined output to the user-supplied load
module (where "mod3" is the module name), instead of SYSPRINT.
The module names mod1, mod2, mod3, can refer to the same module.
The suboptions 'str1', 'str2', 'str3', are optional. They are character
strings up to 64 characters in length and enclosed in apostrophes, that are
passed to the exit module. Any character is allowed, but included apostrophes
must be doubled, and lowercase characters are folded to uppercase.
For more details on using EXIT to provide user-exits, see "Using EXIT to
Provide User-Exits" in topic 5.2.2.9.
- FASTSRT Option
-
|--------------------------------------|
| >>-----|-FastSRT---|------------->< | Default is: NOFASTSRT
| |-NOFastSRT-| |
|--------------------------------------|
FASTSRT allows IBM DFSORT, or its equivalent, to perform the input and output
instead of COBOL.
NOFASTSRT conforms to the American National Standard.
Refer to "Improving Sort Performance with FASTSRT" in topic 3.8.11 for further
information regarding the use of the FASTSRT option.
- FDUMP Option
-
|--------------------------------------|
| >>-----|-FDUmp---|--------------->< | Default is: NOFDUMP
| |-NOFDUmp-| |
|--------------------------------------|
Use FDUMP to produce a formatted dump when execution ends in an abnormal
termination (abend).
If you use FDUMP at run time, include a DD statement to define a data set of
SYSDBOUT for FDUMP output. On CICS, the FDUMP output is written to the
temporary storage CEBRxxxx, where xxxx is the terminal-id associated with the
transaction. If a program compiled with FDUMP executes in the same run unit as
any program compiled with TEST, there will be no formatted dump output. You
will not obtain formatted dump output if you specify the run-time option
NOSTAE.
If NUMBER is specified with FDUMP, sequence fields require numeric characters.
Because statement number tables and data description tables are included as
part of the object code, the size of the object module is increased when you
use FDUMP.
- FLAG Option
-
|--------------------------------------|
| >>-----|-Flag(x|----|)|---------->< | Default is: FLAG(I)
| | |-,y-| | |
| |-NOFlag-------| |
|--------------------------------------|
x I, W, E, S, or U
y I, W, E, S, or U
(See "Compiler Error Message Codes" in topic 5.4.2 for meanings of error
codes.)
Use FLAG(x) to produce diagnostic messages for errors of a severity level x or
above at the end of the source listing.
Use FLAG(x,y) to produce diagnostic messages for errors of severity level x or
above at the end of the source listing, with error messages of severity y and
above to be embedded directly in the source listing. The severity coded for y
must not be lower than the severity coded for x. To use FLAG(x,y), you also
need to specify the SOURCE compiler option.
Error messages in the source listing are set off by embedding the statement
number within an arrow that points to the message code. The message code is
then followed by the message text. For example:
|----------------------------------------------------------------------------|
| |
| |
| 000413 MOVE CORR WS-DATE TO HEADER-DATE |
| |
| ==000413==> IGYPS2121-S " WS-DATE " was not defined as a data-name. ..|
| |
| |
|----------------------------------------------------------------------------|
With FLAG(x,y) selected, messages of severity y and above will be embedded in
the listing following the line that caused the message. (Refer to the notes
below for exceptions.)
Use NOFLAG to suppress error flagging. NOFLAG will not suppress error messages
for compiler options.
Notes:
- Specifying embedded level-U messages is accepted, but will not produce
any messages in the source. Embedding a level-U message is not
recommended.
- The FLAG option does not affect diagnostic messages produced before
the compiler options are processed.
- Diagnostic messages produced during processing of compiler options,
CBL and PROCESS statements, or BASIS, COPY and REPLACE statements, are
never embedded in the source listing. All such messages appear at the
beginning of the compiler output.
- Messages produced during processing of the *CONTROL (*CBL) statement
are not embedded in the source listing.
- FLAGMIG Option
-
|--------------------------------------|
| >>-----|-FLAGMIG---|------------->< | Default is: NOFLAGMIG
| |-NOFLAGMIG-| |
|--------------------------------------|
Use FLAGMIG to identify language elements that may be implemented differently
in Release 2 than in Release 3. To use FLAGMIG, you also need to specify the
CMPR2 compiler option.
NOFLAGMIG conforms to the American National Standard.
Implementation of the ANSI 1985 Standard created some instances where
incompatibilities with Release 2 can occur. Use of the CMPR2 and FLAGMIG
options aid in the migration of programs written for VS COBOL II Release 2 to
the Release 3 level. Appendix C, "Release 2 Compatibility and Migration" in
topic APPENDIX1.3 contains a table of the items that are CMPR2 sensitive and
describes their behavior under CMPR2 and NOCMPR2.
- FLAGSAA Option
-
|--------------------------------------|
| >>-----|-FLAGSAA---|------------->< | Default is: NOFLAGSAA
| |-NOFLAGSAA-| |
|--------------------------------------|
Use FLAGSAA to indicate language elements that are not defined as part of the
COBOL interface for IBM's Systems Application Architecture* (SAA). The purpose
of this flagging is to identify elements that may restrict program portability
across IBM systems. The elements will be flagged with warning (W) level
messages at compile time.
To use FLAGSAA, the NOCMPR2 compiler option must be in effect, and FLAGSTD can
not be specified. If FLAGSTD and FLAGSAA are specified together under NOCMPR2,
FLAGSAA is ignored.
NOFLAGSAA conforms to the American National Standard.
See Systems Application Architecture; Common Programming Interface; COBOL
Reference for more information about SAA and the COBOL interface.
- FLAGSTD Option
-
|--------------------------------------|
| >>-----|-FLAGSTD(x|----||----||)->< | Default is: NOFLAGSTD
| | |-yy-||-,O-|| |
| |-NOFLAGSTD------------| |
|--------------------------------------|
x M, I, or H
Specifies the level or subset of Standard COBOL to be regarded as
conforming.
M Specifies that language elements that are not from the minimum
subset are to be flagged as "nonconforming standard."
I Specifies that language elements that are not from the minimum or
the intermediate subset are to be flagged as "nonconforming
standard."
H Specifies that the high subset is being used and elements will not
be flagged by subset, and that elements in the IBM Extension
category will be flagged as "non-conforming Standard, IBM
extension".
yy D, N, or S
Specifies, by a single character or combination of any two, the
optional modules to be included in the subset.
D Specifies that elements from Debug module level 1 are not flagged
as "non-conforming standard."
N Specifies that elements from Segmentation module level 1 are not
flagged as "non-conforming standard."
S Specifies that elements from Segmentation module level 2 are not
flagged as "non-conforming standard."
If S is specified, N is included (N is a subset of S).
O Specifies that obsolete language elements are flagged as "obsolete."
Use FLAGSTD to get informational messages about the Standard COBOL elements
included in your program. To use FLAGSTD, the NOCMPR2 compiler option must be
in effect. You can specify any of the following items for flagging:
- A selected Federal Information Processing Standard (FIPS) COBOL subset
- Any of the optional modules
- Obsolete language elements
- Any combination of subset and optional modules
- Any combination of subset and obsolete elements
- IBM extensions (these are flagged any time FLAGSTD is specified and
are identified as "non-conforming non-standard").
The informational messages appear in the source program listing and contain the
following information:
- Identify the element as "obsolete," "non-conforming standard," or
"non-conforming non-standard" (a language element that is both
obsolete and non-conforming is flagged as obsolete only).
- Identify the clause, statement, or header that contains the element.
- Identify the source program line and beginning location of the clause,
statement, or header that contains the element.
- Identify the subset or optional module to which the element belongs.
Flagging is suppressed when any errors are detected (diagnostic level E or
higher). FLAGSTD requires the standard set of reserved words.
In the following example, the line number and column where a flagged clause,
statement, or header occurred are shown, as well as the message code and text.
At the bottom is a summary of the total of the flagged items and their type.
|-------------------------------------------------------------------------|
| |
| |
| |
| LINE.COL CODE FIPS MESSAGE TEXT |
| |
| IGYDS8211 Comment lines before "IDENTIFICATION DIVISION": |
| nonconforming nonstandard, IBM extension to |
| ANS/ISO 1985. |
| |
| 11.14 IGYDS8111 "GLOBAL clause": nonconforming standard, ANS/ISO |
| 1985 high subset. |
| |
| 59.12 IGYPS8169 "USE FOR DEBUGGING statement": obsolete element |
| in ANS/ISO 1985. |
| |
| |
| FIPS MESSAGES TOTAL STANDARD NONSTANDARD OBSOLETE |
| |
| 3 1 1 1 |
| |
| |
|-------------------------------------------------------------------------|
- LANGUAGE Option
-
|--------------------------------------|
| >>-----LANGuage(XXxxxxxx)---->< | Default is: LANGUAGE(ENGLISH)
|--------------------------------------|
Use the LANGUAGE option to select the language in which compiler output will be
printed. The information that will be printed in the selected language
includes diagnostic messages, source listing page and scale headers, FIPS
message headers, message summary headers, compilation summary, and headers and
notations that result from the selection of certain compiler options (MAP,
XREF, VBREF, and FLAGSTD).
XXxxxxxx Specifies the language for compiler output messages.
|--------------|-----------------|-----------------------------------|
| Entry | Abbreviation | Explanation |
|--------------|-----------------|-----------------------------------|
| ENGLISH | EN | The output will be printed in |
| | | mixed case English. This is the |
| | | default selection. |
|--------------|-----------------|-----------------------------------|
| JAPANESE° | JA, JP | The output will be printed in the |
| | | Japanese language using the |
| | | Japanese character set. |
|--------------|-----------------|-----------------------------------|
| UENGLISH | UE | The output will be printed in |
| | | upper-case English. |
|--------------|-----------------|-----------------------------------|
| Notes: |
| 1. To specify the Japanese language option, the Japanese Language |
| Feature must be installed. |
| 2. If your installation's systems programmer has provided a |
| language other than those described, you must specify at least |
| the first two characters of this other language's name. |
|--------------------------------------------------------------------|
If the LANGUAGE option is changed at compile time (using CBL or PROCESS
statements), some initial text will be printed using the language that was in
effect at the time the compiler was invoked.
See VS COBOL II Installation and Customization for CMS or VS COBOL II
Installation and Customization for MVS for information on selecting the
language of run-time messages and FDUMP output.
- LIB Option
-
|--------------------------------------|
| >>-----|-LIB---|----------------->< | Default is: NOLIB
| |-NOLIB-| |
|--------------------------------------|
If your program uses COPY, BASIS, or REPLACE statements, you need to specify
the LIB compiler option. In addition, for COPY and BASIS statements, include
in your JCL DD statements for the library or libraries from which the compiler
can take the copied code, and also allocate and free SYSUT5.
LIB conforms to the American National Standard.
- LINECOUNT Option
-
|--------------------------------------|
| >>-----LineCount(nnn)------------->< | Default is: LINECOUNT(60)
|--------------------------------------|
Use LINECOUNT(nnn) to specify the number of lines to be printed on each Use
LINECOUNT(nnn) to specify the number of lines to be printed on each page of the
compilation listing, or use LINECOUNT(0) to suppress pagination.
nnn must be an integer between 10 and 255, or 0.
If you specify LINECOUNT(0), no page ejects are generated within the
compilation listing.
The compiler uses three lines of nnn for titles. For example, if you specify
LINECOUNT(60), 57 lines of source code are printed on each page of the output
listing.
- LIST Option
-
|--------------------------------------|
| >>-----|-LIST---|---------------->< | Default is: NOLIST
| |-NOLIST-| |
|--------------------------------------|
Use LIST to produce a listing of the assembler-language expansion of your
source code.
You'll also get these in your output listing:
Global tables
Literal pools
Information about Working-Storage
Size of the program's Working-Storage, and its location in the object
code if the program is compiled with the NORENT option.
LIST and OFFSET are mutually exclusive. If you use both, LIST is ignored.
If you want to limit the assembler listing output, use *CONTROL LIST or NOLIST
statements in your Procedure Division. Your source statements following a
*CONTROL NOLIST are not included in the listing at all, unless a *CONTROL LIST
statement switches the output back to normal LIST format.
- MAP Option
-
|--------------------------------------|
| >>-----|-MAP---|----------------->< | Default is: NOMAP
| |-NOMAP-| |
|--------------------------------------|
Use MAP to produce a listing of the items you defined in the Data Division.
Map output includes:
Data Division map
Global tables
Literal pools
Nested program structure map, and program attributes
Size of the program's Working-Storage, and its location in the object
code if the program is compiled with the NORENT option.
If you want to limit the MAP output, use *CONTROL MAP or NOMAP statements in
your Procedure Division. Your source statements following a *CONTROL NOMAP are
not included in the listing at all, unless a *CONTROL MAP statement switches
the output back to normal MAP format.
Under Releases 3.1 and 3.2, by selecting the MAP option, you can also print an
imbedded MAP report in the source code listing. The condensed MAP information
is printed to the right of data-name definitions in the File Section,
Working-Storage Section, and Linkage Section of the Data Division.
For information on using MAP output and the imbedded MAP report, see VS COBOL
II Application Programming: Debugging.
- NAME Option
-
|--------------------------------------|
| >>-----|-NAME-|-------------|-|-->< |
| | |(|-ALIAS---|)| | |
| | |-NOALIAS-| | |
| |-NONAME---------------| |
|--------------------------------------|
Default is: NONAME, or NAME(NOALIAS) if only NAME is specified
Use NAME to generate a link-edit NAME card for each object module. NAME is
also used to generate names for each load module when doing batch compilations
(see Figure 92 in topic 5.1.4). When NAME is specified, a NAME card is
appended to each object module that is created. Load module names are formed
using the rules for forming module names from PROGRAM-ID statements as
described in VS COBOL II Application Programming: Language Reference.
If you specify NAME(ALIAS), and if your program contains ENTRY statements, a
link-edit ALIAS card is generated for each ENTRY statement.
- NUMBER Option
-
|--------------------------------------|
| >>-----|-NUMber---|-------------->< | Default is: NONUMBER
| |-NONUMber-| |
|--------------------------------------|
Use NUMBER if you have line numbers in your source code and want those numbers
to be used in error messages and MAP, LIST, and XREF listings.
If you request NUMBER, columns 1 through 6 are checked to make sure that they
contain only numbers, and the sequence is checked according to numeric
collating sequence. (In contrast, SEQUENCE checks them according to EBCDIC
collating sequence.) When a line number is found to be out of sequence, the
compiler assigns to it a line number with a value one number higher than the
line number of the preceding statement. Sequence-checking continues with the
next statement, based on the newly assigned value of the previous line.
If you use COPY statements and NUMBER is in effect, be sure that your source
program line numbers and the COPY member line numbers are coordinated.
Use NONUMBER if you don't have line numbers in your source code, or if you want
the compiler to ignore the line numbers you do have in your source code. With
NONUMBER in effect, the compiler generates line numbers for your source
statements and uses those numbers as references in listings.
NONUMBER conforms to the American National Standard.
- NUMPROC Option
-
|--------------------------------------|
| >>-----NUMPROC(|-PFD---|)-------->< | Default is: NUMPROC(NOPFD)
| |-NOPFD-| |
| |-MIG---| |
|--------------------------------------|
Use NUMPROC(NOPFD) if you want the compiler to perform invalid sign processing.
This option is not as efficient as NUMPROC(PFD); object code size will be
increased, and there may be an increase in run-time overhead to validate all
signed data.
NUMPROC(NOPFD) and NUMPROC(MIG) conform to the American National Standard.
NUMPROC(PFD) is a performance option that can be used to bypass invalid sign
processing. Use this option only if your program data agrees exactly with the
following IBM system standards:
External decimal, unsigned--High-order 4 bits of the sign byte contain X'F'.
External decimal, signed overpunch--High-order 4 bits of the sign byte contain
X'C' if the number is positive or 0, X'D' if it is not.
External decimal, separate sign--Separate sign contains the character '+' if
the number is positive or 0, '-' if it is not.
Internal decimal, unsigned--Low-order 4 bits of the low-order byte contain
X'F'.
Internal decimal, signed--Low-order 4 bits of the low-order byte contain X'C'
if the number is positive or 0, X'D' if it is not.
Data produced by VS COBOL II arithmetic statements conforms to the above IBM
system standards. However, the use of REDEFINES and group moves could alter
data so that it no longer conforms. If NUMPROC(PFD) is used, the INITIALIZE
statement should be used to initialize data fields, rather than using group
moves.
The use of NUMPROC(PFD) can affect class tests for numeric data.
NUMPROC(NOPFD), or NUMPROC(MIG), should be used if a COBOL program calls
programs written in PL/I or FORTRAN.
Sign representation is not only affected by the NUMPROC option, but also by the
installation time option NUMCLS. See Figure 20 and Figure 21 in topic 3.3.3
for the sign representations recognized by numeric class testing.
Use NUMPROC(MIG) to aid in migrating OS/VS COBOL programs to VS COBOL II. When
NUMPROC(MIG) is in effect, the following processing occurs:
- Preferred signs are created only on the output of MOVE statements and
arithmetic operations.
- No explicit sign repair is done on input.
- Some implicit sign repair may occur during conversion.
- Numeric comparisons are performed by a decimal compare, not a logical
compare.
For more information on NUMPROC, see "Sign Representation" in topic 3.3.1.
- OBJECT Option
-
|--------------------------------------|
| >>-----|-OBJect---|-------------->< | Default is: OBJECT
| |-NOOBJect-| |
|--------------------------------------|
Use OBJECT to place the generated object code on disk or tape to be later used
as input for the linkage editor.
If you specify OBJECT, include a SYSLIN DD statement in your JCL for
compilation.
The only difference between DECK and OBJECT is in the routing of the data sets:
DECK output goes to the data set associated with SYSPUNCH ddname.
OBJECT output goes to the data set associated with SYSLIN ddname.
Use the option your installation guidelines recommend.
NOOBJECT and TEST are mutually exclusive. If you use both, NOOBJECT is
ignored.
- OFFSET Option
-
|--------------------------------------|
| >>-----|-OFFset---|-------------->< | Default is: NOOFFSET
| |-NOOFFset-| |
|--------------------------------------|
Use OFFSET to produce a condensed Procedure Division listing. With OFFSET, the
procedure portion of the listing will contain line numbers, statement
references, and the location of the first instruction generated for each
statement. In addition, the following are produced:
Global tables
Literal pools
Size of the program's Working-Storage, and its location in the object
code if the program is compiled with the NORENT option.
OFFSET and LIST are mutually exclusive. If you use both, LIST is ignored.
- OPTIMIZE Option
-
|--------------------------------------|
| >>-----|-OPTimize---|------------>< | Default is: NOOPTIMIZE
| |-NOOPTimize-| |
|--------------------------------------|
Use OPTIMIZE to reduce the run time of your object program; optimization may
also reduce the amount of main storage your object program uses. Since
OPTIMIZE increases compile time, it should not be used when debugging.
The OPTIMIZE option is turned off in the case of a severe-level error or
higher. OPTIMIZE and TEST are mutually exclusive. If you use both, OPTIMIZE
is ignored.
- OUTDD Option
-
|--------------------------------------|
| >>-----OUTdd(ddname)------------->< | Default is: OUTDD(SYSOUT)
|--------------------------------------|
Use OUTDD if you want run-time DISPLAY output on a data set other than SYSOUT.
- QUOTE/APOST Option
-
|--------------------------------------|
| >>-----|-Quote-|----------------->< | Default is: QUOTE
| |-APOST-| |
|--------------------------------------|
Use QUOTE if you want the quotation mark (") to be the delimiter character for
literals.
QUOTE conforms to the American National Standard.
Use APOST if you want the apostrophe (') to be the delimiter character for
literals.
- RENT Option
-
|--------------------------------------|
| >>-----|-RENT---|---------------->< | Default is: NORENT
| |-NORENT-| |
|--------------------------------------|
Use RENT if your object code is to be reentrant. When you use this option, the
RESIDENT option is also put into effect. A program compiled as RENT is
generated as a reentrant object module and can be invoked as a main program or
subprogram.
Reentrant object code can be executed only in run units where all COBOL
programs have been generated with the RESIDENT option unless the run-time
option MIXRES has been specified.
A program compiled as NORENT is generated as a nonreentrant object module and
can be invoked as a main program or subprogram.
Note: Do not use NORENT with CICS.
When a reentrant program is to be run under XA, the DATA(24|31) option may be
used to control whether dynamic data areas are allocated in unrestricted
storage or in storage acquired from below 16 megabytes. Programs must be
compiled with RENT if they will be executed under XA in virtual storage
addresses above 16 megabytes.
Valid Combinations of DYNAM, RESIDENT, and RENT:
NORENT and NORES and NODYNAM
Nonreentrant code, no COBOL Library Management feature, CALL
literal is static call.
NORENT and RES and NODYNAM
Nonreentrant code, COBOL library routines called dynamically, CALL
literal is static call.
NORENT and RES and DYNAM
Nonreentrant code, COBOL library routines and user subprograms all
called dynamically.
RENT and RES and NODYNAM
Reentrant code, COBOL library routines called dynamically, CALL
literal is static call.
RENT and RES and DYNAM
Reentrant code, COBOL library routines and user subprograms all
called dynamically.
RENT implies the RESIDENT option.
RENT is not valid with NORESIDENT.
DYNAM implies the RESIDENT option.
DYNAM is not valid with NORESIDENT.
- RESIDENT Option
-
|--------------------------------------|
| >>-----|-RESident---|------------>< | Default is: NORESIDENT
| |-NORESident-| |
|--------------------------------------|
Use the RESIDENT option to request the COBOL Library Management Feature. (The
COBOL Library Management Feature causes most COBOL library subroutines to be
located dynamically at run time, instead of being link-edited with the COBOL
program.) In this way, application programs automatically take advantage of
any service updates applied to the library subroutines without having to be
link-edited again.
Even if you don't specify it, the RESIDENT option is always in effect when the
DYNAM option is specified or if your program uses CALL identifier. For
information on the interaction of RESIDENT and other compiler options, see
"Valid Combinations of DYNAM, RESIDENT, and RENT" on page 5.2.2.8.31.
If a COBOL run unit is generated entirely by compiling with VS COBOL II and
NORESIDENT, the load module contains all required VS COBOL II library modules
for execution; that is, an online VS COBOL II library is not required at run
time.
RESIDENT conforms to the American National Standard.
Note: Do not use NORESIDENT with CICS.
- SEQUENCE Option
-
|--------------------------------------|
| >>-----|-SEQuence---|------------>< | Default is: SEQUENCE
| |-NOSEQuence-| |
|--------------------------------------|
When you use SEQUENCE, the compiler examines columns 1 through 6 of your source
statements to check that the statements are arranged in ascending order
according to their EBCDIC collating sequence. The compiler issues a diagnostic
message if any statements are not in ascending sequence (source statements with
blanks in columns 1 through 6 do not participate in this sequence check and do
not result in messages).
If you use COPY statements and SEQUENCE is in effect, be sure that your source
program sequence fields and the COPY member sequence fields are coordinated.
If you use NUMBER and SEQUENCE, the sequence is checked according to numeric,
rather than EBCDIC, collating sequence.
Use NOSEQUENCE to suppress this checking and the diagnostic messages.
NOSEQUENCE conforms to the American National Standard.
- SIZE Option
-
|--------------------------------------|
| >>-----SiZe(|-nnnnn-|)----------->< | Default is: SIZE(MAX)
| |-nnnK--| |
| |-MAX---| |
|--------------------------------------|
nnnn A decimal number that must be at least 655360.
nnnK A decimal number in 1K increments. The minimum acceptable value is
640K.
MAX Requests the largest available block of storage in the user region for
use during compilation.
Use SIZE to specify the amount of main storage available for compilation (where
1K = 1024 bytes decimal).
Do not use SIZE(MAX) if, when you invoke the compiler, you require it to leave
a specific amount of unused storage available in the user region. If you
specify SIZE(MAX) in an XA environment, the compiler will use:
- Above the 16-megabyte line--all the storage in the user region
- Below the 16-megabyte line--storage for:
- Work file buffers
- Compiler modules that must be loaded below the line.
- SOURCE Option
-
|--------------------------------------|
| >>-----|-Source---|-------------->< | Default is: SOURCE
| |-NOSource-| |
|--------------------------------------|
Use SOURCE to get a listing of your source program. This listing will include
any statements embedded by PROCESS or COPY statements.
SOURCE must be specified if you want embedded messages in the source listing.
Use NOSOURCE to suppress the source code from the compiler output listing.
If you want to limit the SOURCE output, use *CONTROL SOURCE or NOSOURCE
statements in your Procedure Division. Your source statements following a
*CONTROL NOSOURCE are not included in the listing at all, unless a *CONTROL
SOURCE statement switches the output back to normal SOURCE format.
- SPACE Option
-
|--------------------------------------|
| >>-----SPACE(|-1-|)-------------->< | Default is: SPACE(1)
| |-2-| |
| |-3-| |
|--------------------------------------|
Use SPACE to select single, double, or triple spacing in your source code
listing.
SPACE is meaningful only when SOURCE is in effect.
- SSRANGE Option
-
|--------------------------------------|
| >>-----|-SSRange---|------------->< | Default is: NOSSRANGE
| |-NOSSRange-| |
|--------------------------------------|
Use SSRANGE to generate code that checks if subscripts or indexes attempt to
reference an area outside the region of the table. Each subscript or index is
not individually checked for validity; rather, the effective address is checked
to ensure that it does not cause a reference outside the region of the table.
Variable-length items will also be checked to ensure that their current length
is within their maximum defined length.
Reference modification expressions will be checked to ensure that:
- The reference modification starting position is greater than or equal
to 1
- The reference modification starting position is not greater than the
current length of the subject data item
- The reference modification length value (if specified) is greater than
or equal to 1
- The reference modification starting position and length value (if
specified) do not reference an area beyond the end of the subject data
item.
If VS COBOL II detects an out-of-range condition, it will display an error
message and terminate the program. Under MVS, these error messages are written
to write-to-programmer route code 11 (usually SYSPRINT). Under CICS, these
messages are written to the temporary storage queue, CEBRxxxx, where xxxx is
the terminal-id associated with the transaction.
If SSRANGE is in effect at compile time, the range-checking code is generated;
range checking can be inhibited at run time by specifying NOSSRANGE as a
run-time option. This leaves range-checking code dormant within the object
code. The range-checking code can then be optionally used to aid in resolving
any unexpected errors without recompilation.
- TERMINAL Option
-
|--------------------------------------|
| >>-----|-TERMinal---|------------>< | Default is: NOTERMINAL
| |-NOTERMinal-| |
|--------------------------------------|
Use TERMINAL to send progress and diagnostic messages to the SYSTERM data set.
Use NOTERMINAL if this additional output is not desired.
- TEST Option
-
|--------------------------------------|
| >>-----|-TESt---|---------------->< | Default is: NOTEST
| |-NOTESt-| |
|--------------------------------------|
Use TEST to produce object code that can be executed with VS COBOL II batch or
interactive debug. When you specify TEST, the following options go into
effect: RES, NOFDUMP, NOOPTIMIZE, and OBJECT.
If NUMBER is specified with TEST, sequence fields require numeric characters.
TEST is deactivated if both the WITH DEBUGGING MODE clause and the USE FOR
DEBUGGING statement are specified. The TEST option will appear in the list of
options, but a diagnostic message will be issued to advise you that, because of
the conflict, TEST will not be in effect.
- TRUNC Option
-
|--------------------------------------|
| >>-----TRUNC(|-STD-|)------------>< | Default is: TRUNC(STD)
| |-OPT-| |
| |-BIN-| |
|--------------------------------------|
TRUNC(STD) conforms to the American National Standard, while TRUNC(OPT) and
TRUNC(BIN) are IBM extensions.
Note: TRUNC(STD) and TRUNC(OPT) are equivalent to TRUNC and NOTRUNC
(respectively) in VS COBOL II Release 2.
Use TRUNC(STD) to control the way arithmetic fields are truncated during MOVE
and arithmetic operations. TRUNC(STD) applies only to USAGE BINARY receiving
fields in MOVE statements and arithmetic expressions. When TRUNC(STD) is in
effect, the final result of an arithmetic expression, or the sending field in
the MOVE statement, is truncated to the number of digits in the PICTURE clause
of the BINARY receiving field.
TRUNC(OPT) is a performance option. When TRUNC(OPT) is specified, the compiler
assumes that the data conforms to PICTURE and USAGE specifications of the USAGE
BINARY receiving fields in MOVE statements and arithmetic expressions. The
results are manipulated in the most optimal way, either truncating to the
number of digits in the PICTURE clause, or to the size of the binary field in
storage (halfword, fullword, or doubleword).
You should use the TRUNC(OPT) option only if you are sure that the data being
moved into the binary areas will not have a value with larger precision than
that defined by the PICTURE clause for the binary item. Otherwise, truncation
of high-order digits may occur. This truncation is performed in the most
efficient manner possible; thus, the results will be dependent on the
particular code sequence generated. It is not possible to predict the
truncation without seeing the code sequence generated for a particular
statement.
The TRUNC(BIN) option applies to all COBOL language that processes USAGE BINARY
data. When TRUNC(BIN) is in effect:
- BINARY receiving fields are truncated only at halfword, fullword, or
doubleword boundaries.
- BINARY sending fields are treated as halfwords, fullwords, or
doublewords.
- The full binary content of the field is significant.
- DISPLAY will convert the entire content of the binary field, with no
truncation.
Note: TRUNC(BIN) is the recommended option when interfacing with other
products that have 370 format binary data (such as CICS, DB2, FORTRAN, and
PLI). This is particularly true if there is a possibility of having more than
9 digits in a fullword, or more than 4 digits in a halfword.
Example 1:
01 BIN-VAR PIC 99 USAGE BINARY
MOVE 123456 to BIN-VAR
|---------------------------|--------------|--------------|--------------|
| | Decimal | Hex | Display |
|---------------------------|--------------|--------------|--------------|
| Sender | 123456 | 00|01|E2|40 | |
|---------------------------|--------------|--------------|--------------|
| Receiver TRUNC(STD) | 56 | 00|38 | 56 |
|---------------------------|--------------|--------------|--------------|
| Receiver TRUNC(OPT) | -7616 | E2|40 | 1O |
|---------------------------|--------------|--------------|--------------|
| Receiver TRUNC(BIN) | -7616 | E2|40 | 0761O |
|---------------------------|--------------|--------------|--------------|
A halfword of storage is allocated for BIN-VAR. The result of this MOVE
statement if the program is compiled with the TRUNC(STD) option is 56, the
field is truncated to conform to the Picture clause. If the program is
compiled with the TRUNC(BIN) option, the result is -7616.
The reason for the unusual looking answer in the TRUNC(BIN) version is that
nonzero high-order digits were truncated. In this case, the generated code
sequence would merely move the lower halfword quantity X'E240' to the receiver.
Because the new truncated value overflowed into the sign bit of the binary
halfword, the value becomes a negative number.
This MOVE statement should not be compiled with the TRUNC(OPT) option because
123456 has greater precision than the PICTURE clause for BIN-VAR. If
TRUNC(OPT) was used, however, the results again would be -7616. This is
because the best performance was gained by not doing a decimal truncate.
Example 2:
01 BIN-VAR PIC 9(6) USAGE BINARY
MOVE 1234567890 to BIN-VAR
|---------------------------|--------------|--------------|--------------|
| | Decimal | Hex | Display |
|---------------------------|--------------|--------------|--------------|
|---------------------------|--------------|--------------|--------------|
| Sender | 1234567890 | 49|96|02|D0 | |
|---------------------------|--------------|--------------|--------------|
| Receiver TRUNC(STD) | 567890 | 00|08|AA|52 | 567890 |
|---------------------------|--------------|--------------|--------------|
| Receiver TRUNC(OPT) | 567890 | 00|08|AA|52 | 567890 |
|---------------------------|--------------|--------------|--------------|
| Receiver TRUNC(BIN) | 1234567890 | 49|96|02|D0 | 1234567890 |
|---------------------------|--------------|--------------|--------------|
When TRUNC(STD) is specified, the sending data is truncated to six integer
digits to conform to the PICTURE clause of the BINARY receiver.
When TRUNC(OPT) is specified, the compiler assumes the sending data is not
larger than the PICTURE clause precision of the BINARY receiver. The most
efficient code sequence in this case performed truncation as if TRUNC(STD) had
been specified.
When TRUNC(BIN) is specified, no truncation occurs because all of the sending
data will fit into the binary fullword allocated for BIN-VAR
- VBREF Option
-
|--------------------------------------|
| >>-----|-VBREF---|--------------->< | Default is: NOVBREF
| |-NOVBREF-| |
|--------------------------------------|
Use VBREF to get a cross-reference among all verb types used in the source
program and the line numbers in which they are used. VBREF also produces a
summary of how many times each verb was used in the program.
Use NOVBREF for more efficient compilation.
- WORD Option
-
|--------------------------------------|
| >>-----|-WorD(xxxx)-|------------>< | Default is: NOWORD
| |-NOWorD-----| |
|--------------------------------------|
Use WORD(xxxx) to specify that an alternate reserved word table is to be used
during compilation.
Alternate reserved word tables provide changes to the IBM-supplied default
reserved word table. Your systems programmer might have created one or more
alternate reserved word tables for your site. See your systems programmer for
the names of alternate reserved word tables.
|--- Release 3.2 Only ---------------------------------------------------|
| |
| A CICS-specific reserved word table (IGYCCICS) is provided with VS |
| COBOL II as an alternate reserved word table. If you use CICS at your |
| site, your systems programmer might have customized VS COBOL II to use |
| the CICS reserved word table by default, according to the instructions |
| in the installation manual. See your systems programmer for more |
| information. |
| |
| For information on the CICS reserved word table, refer to "CICS |
| Reserved Word Table (Release 3.2 Only)" in topic 3.11.4. |
| |
|------------------------------------------------------------------------|
xxxx The ending characters (may be 1 to 4 characters in length) of the name
of the reserved word table to be used for your compilation.
NOWORD conforms to the American National Standard.
- XREF Option
-
|--------------------------------------|
| >>-|-Xref-|---------------|-|-->< | Default is: NOXREF
| | |-(-|-SHORT-|-)-| | |
| | |-FULL--| | |
| | | |
| |-NOXref-----------------| |
|--------------------------------------|
Under Releases 3.1 or 3.2, you have the choice of XREF, XREF(FULL), or
XREF(SHORT). Both XREF and XREF(FULL), which yield the same results, provide
the same cross-reference listing as XREF under Release 3.0.
Use XREF to get a sorted cross-reference listing. EBCDIC data-names and
procedure-names will be listed in alphanumeric order. DBCS data-names and
procedure-names will be listed based on their physical order in the program,
and will appear before the EBCDIC data-names and procedure-names, unless the
DBCSXREF installation option is selected with a DBCS ordering program. In this
case, DBCS data-names and procedure-names will be ordered as specified by the
DBCS ordering program.
Also included will be a section listing all the program names that are
referenced within your program, and the line number where they are defined.
External program names will be identified as such.
If you use XREF and SOURCE, cross-reference information will also be printed on
the same line as the original source in the listing. Line number references or
other information, will appear on the right hand side of the listing page.
Information included in the embedded references lets you know if the name is
undefined, or duplicately defined (UND or DUP will be printed); if an item is
implicitly defined (IMP), such as special registers or figurative constants;
and if a program name is external (EXT).
If you use XREF and NOSOURCE, you'll get only the sorted cross-reference
listing.
XREF(SHORT) will print on the explicitly referenced variables in the
cross-reference listing. XREF(SHORT) applies to DBCS data names and
procedure-names as well as EBCDIC names.
NOXREF suppresses this listing.
Notes:
- Group names used in a MOVE CORRESPONDING statement will be listed in
the XREF listing, in addition, the elementary names within those
groups will also be listed.
- In the data-name XREF listing, line numbers preceded by the letter "M"
indicate that the data item is explicitly modified by a statement on
that line.
- XREF listings take additional storage.
- ZWB Option
-
|--------------------------------------|
| >>-----|-ZWB---|----------------->< | Default is: ZWB
| |-NOZWB-| |
|--------------------------------------|
With ZWB, the compiler removes the sign from a signed external decimal
(DISPLAY) field when comparing this field to an alphanumeric elementary field
during execution.
If the external decimal item is a scaled item (contains the symbol 'P' in its
PICTURE character-string), its use in comparisons will not be affected by ZWB.
Such items always have their sign removed before the comparison is made to the
alphanumeric field.
ZWB affects program execution logic; that is, the same COBOL source program can
give different results, depending on the option setting.
ZWB conforms to the American National Standard.
Use NOZWB if you want to test input numeric fields for SPACES.