COBOL-Compiler Options and Compile JCL
COBOL-Compiler Options and Compile JCL
COBOL-Compiler Options and Compile JCL
ADV:
This is a COBOL compiler option.
Format: ADV NOADV
Abbreviations: None
IBM-default: ADV
ADV, which conforms to the ANSI standard, requests that the compiler add
1 byte to the record length to account for the printer control character
when WRITE with the ADVANCING option is used.
NOADV implies that the record length has already been adjusted to account
for the printer control character.
QUOTE/APOST:
This is a COBOL compiler option.
Format: QUOTE APOST
Abbreviations: Q
IBM-default: QUOTE
QUOTE, which conforms to the ANSI standard, specifies that the double
quotation mark (“) is to be the delimiter character for non-numeric literals.
APOST specifies that the single quote mark or apostrophe (‘) is to be the
delimiter character for non-numeric literals.
AWO:
This is a COBOL compiler option.
Format: AWO NOAWO
Abbreviations: NOAWO
IBM-default: None
AWO specifies that, for any file in the program which is physical
sequential with blocked V-mode records, the APPLY WRITE-ONLY clause be
in effect (even if this clause is not specified in the program).
BUFSIZE:
This is a COBOL compiler option.
Format: BUFSIZE(nnnn)
(nnnK)
where nnnn is a decimal number no less than 256
nnnK is a decimal number in 1K (1024) increments
Abbreviations: BUF
IBM-default: 4096
BUFSIZE specifies the amount of main storage to be allocated to each
compiler work file buffer.
Generally, a large buffer size will improve compiler performance;
however, BUFSIZE cannot exceed the track capacity for the device being used
nor can it exceed the maximum allowed by data management services.
If the SIZE option is specified along with BUFSIZE, the amount of storage
allocated to buffers is included in the amount of storage available for
compilation as specified by the SIZE option.
CMPR2:
This is a COBOL compiler option.
Format: CMPR2 NOCMPR2
Abbreviations: None
IBM-default: NOCMPR2
CMPR2 requests that generated object code be compatible with code
generated by VS COBOL II Release 2.
NOCMPR2 requests that generated object code conform to the ANSI ‘85
standard (i.e., as implemented by VS COBOL II Release 3, which, in some
instances, is incompatible with Release 2).
CMPR2 (which forces on the FLAGMIG option) can be used to assist in the
migration of programs written under Release 2 to the ‘85 standard (i.e., to the
Release 3 level).
See “Release 2 Compatibility And Migration” in the VS COBOL II Release 3
APPLICATION PROGRAMMING GUIDE for more information (including a list
of elements that are CMPR2 sensitive and a description of their behavior
under CMPR2 and NOCMPR2).
COMPILE:
This is a COBOL compiler option.
Format: COMPILE NOCOMPILE NOCOMPILE(W)
(E)
(S)
Abbreviations: C NOC IBM-default:
NOCOMPILE(S)
COMPILE forces a full compilation even when serious errors are detected. All
diagnostics and object code will be generated (even though the object code
should not be executed if serious errors are detected).
NOCOMPILE requests a syntax check only. Diagnostic messages (but no object
code) are produced. When NOCOMPILE is specified, the following options
have no effect (even though listed among the options in effect) because no
object code is generated:
DECK FDUMP LIST
OBJECT OFFSET OPTIMIZE
SSRANGE TEST
PARM=(DECK,NAME,NODECK)
would result in NODECK being used as the active option.
The table below shows how mutually exclusive options (i.e., LIST and OFFSET,
RENT and NORES, etc.). are handled when specified at the same level of
precedence.
OPTION OPTION OPTION
SPECIFIED IGNORED FORCED ON*
---------------- --------------- -----------------
NONUMBER
NUMPROC(NOPFD) or NUMPROC(MIG) QUOTE
RESIDENT NOSEQUENCE
TRUNC(STD)
NOWORD
ZWB
The chart below shows what you can do with compiler options by grouping
them into various activities and, within each activity, listing the specific task
associated with each option.
Compiler
Activity/Task Option
------------------------------------------------------ ---------
Miscellaneous:
• Select reserved word list........................ WORD
• Process COPY, BASIS, and REPLACE statements...... LIB
• Provide User-exits............................... EXIT
DATA:
This is a COBOL compiler option.
Format: DATA(24)
(31)
Abbreviations: None IBM-default: DATA(31)
For a program compiled with the RENT option which is to be executed
under XA, the DATA option specifies whether dynamic storage (for data
areas such as WORKING STORAGE, file buffers, etc.) is to be acquired
from below the 16-meg line or from unrestricted storage.
DATA(24) specifies that dynamic storage areas are to be
allocated from storage below the 16-meg line.
DBCS:
This is a COBOL compiler option.
Format: DBCS NODBCS
Abbreviations: None
IBM-default: NODBCS
DBCS instructs the compiler to recognize X’0E’ and X’0F’ as shift codes for
the double byte portion of a non-numeric literal. (The double byte
portion is syntax checked; the literal remains in the alphanumeric category.)
If either CMPR2 or FLAGSTD is specified, DBCS is ignored.
NODBCS conforms to the ANSI standard.
DECK:
This is a COBOL compiler option.
Format: DECK NODECK
Abbreviations: D NOD
IBM-default: NODECK
DECK requests that object code be produced in the form of 80- column card
images and output to the SYSPUNCH dd statement.
DUMP:
This is a COBOL compiler option.
Format: DUMP NODUMP
Abbreviations: DU NODU
IBM-default: NODUMP
DUMP requests that a dump be produced whenever the compiler
abnormally terminates. This option is normally used by IBM personnel in
order to diagnose bugs in the compiler itself. When DUMP is specified, a
SYSABEND, SYSUDUMP, or SYSMDUMP dd statement should be included in
the compile JCL.
NODUMP provides a limited set of diagnostic information when the compiler
abnormally terminates. This includes a description of the error, the compiler
execution phase at the time of the abend, the line number of the COBOL
statement being processed when the error occured, and the contents of the
general purpose registers.
DYNAM:
This is a COBOL compiler option.
Format: DYNAM NODYNAM
Abbreviations: DYN NODYN
IBM-default: NODYNAM
DYNAM specifies that separately compiled programs invoked through the
CAll literal statement (i.e., a CALL statement where the program to be called
is specifed in the form of a literal) are to be loaded dynamically at run time.
NODYNAM implies that programs invoked through the CALL literal statement
will be statically linked into the run-unit prior to execution.
EXIT:
This is a COBOL compiler option.
Format: EXIT(xparm) NOEXIT
Abbreviations: EX NOEX
IBM-default: NOEXIT
EXIT, depending upon the sub-parameters specified, instructs the compiler to:
• accept source input from a user-supplied exit module (rather than
from the file defined with the SYSIN dd statement)
• accept copy input from a user-supplied exit module (rather than from the
file defined with the SYSLIB dd statement)
• pass printer output to a user-supplied exit module (rather than to the file
defined with the SYSPRINT dd statement)
LIBEXIT(‘libstring’,libmod) or NOLIBEXIT
PRTEXIT(‘prtstring’,prtmod) or NOPRTEXIT
where inmod, libmod, and prtmod are, respectively, the
names of the user-supplied load modules
to be used in
place of SYSIN, SYSLIB, and SYSPRINT
and ‘instring’, ‘libstring’, and ‘prtmod’ are optional
character strings of up to 64 characters (enclosed in
apostrophes) that are to be passsed to the
corresponding user-supplied load module
INEXIT, LIBEXIT, and PRTEXIT may be abbreviated as INEX, LIBEX, and PRTX,
respectively.
EXIT may only be specified via a JCL parm or as an installation default (i.e.,
it may not be specified in a PROCESS/CBL statement).
FASTSRT:
This is a COBOL compiler option.
Format: FASTSRT NOFASTSRT
Abbreviations: FSRT NOFSRT
IBM-default: NOFASTSRT
FASTSRT specifies that, during an internal sort operation, IBM DFSORT (or
an equivalent sort product) is to perform the I/O operations on sort input and
output files (i.e., SORT USING and GIVING). This option may improve
internal sort performance.
NOFASTSRT, which is the ANSI standard, specifies that COBOL is to perform
the I/O operations on these files.
FDUMP:
This is a COBOL compiler option.
Format: FDUMP NOFDUMP
Abbreviations: FDU NOFDU
IBM-default: NOFDUMP
FDUMP requests that a formatted dump be produced at run time when
execution ends in an abnormal termination.
When FDUMP is specified:
• the run time execution JCL should include a SYSDBOUT dd statement for
FDUMP output
• if NUMBER is also specified, the sequence fields in columns 1 through 6
must be numeric
• the size of the object module is increased (because statement
number and data description tables are included as part of the object
code)
No formatted dump will be produced if the NOSTAE run time option is used or
if any other program in the run-unit was compiled with TEST.
FLAG:
This is a COBOL compiler option.
Format: FLAG(a) NOFLAG
(a,b) where a and b are specified as I, W, E,
S, or U Abbreviations: F NOF IBM-
default: FLAG(I)
FLAG(a) directs the compiler to produce diagnostic messages for errors of
severity level a or above at the end of the source listing.
FLAG(a,b) directs the compiler to produce diagnostic messages for errors of
severity level a or above at the end of the source listing and to also place
diagnostic messages for errors of severity level b and above directly in the
source lising (i.e., directly after the statement in error). FLAG(a,b) has
no meaning unless the SOURCE option is also specified.
NOFLAG directs the compiler to suppress error flagging.
The levels of severity for diagnostic messages are shown below:
I Informational (Return Code=0)
W Warning (Return Code=4)
E Error (Return Code=8)
S Severe (Return Code=12)
U Unrecoverable (Return Code=16)
FLAGMIG:
This is a COBOL compiler option.
Format: FLAGMIG NOFLAGMIG
Abbreviations: None
IBM-default: NOFLAGMIG
FLAGMIG requests that the compiler identify language elements that may be
implemented differently in Release 2 than in Release 3 (which conforms to the
‘85 ANSI standard).
NOFLAGMIG conforms to the ANSI standard.
FLAGMIG is intended to be used, in conjunction with CMPR2 (which forces on
FLAGMIG), to aid in the migration of programs written under VS COBOL II
Release 2 to the Release 3 level (i.e., to the ‘85 standard). See CMPR2 for
more information.
FLAGSAA:
This is a COBOL compiler option.
Format: FLAGSAA NOFLAGSAA
Abbreviations: None
IBM-default: NOFLAGSAA
FLAGSAA requests that the compiler identify (by flagging with a warning
message) language elements that are not Systems Application
Architecture (SAA) compatible. This will identify program elements that
may restrict program portability across IBM systems.
NOFLAGSAA conforms to the ANSI standard.
The NOCMPR2 compiler option must be in effect in order to use FLAGSAA
and the FLAGSTD option can not be used. If FLAGSTD and FLAGSAA are
both specified along with NOCMPR2, FLAGSAA is ignored.
FLAGSTD:
This is a COBOL compiler option.
Format: FLAGSTD(s) NOFLAGSTD
(smm)
(smm,o)
(s,o)
where s is specified as M, I, or H in order to set the
level or subset of Standard COBOL that is to be
considered as conforming
mm is specified (as a single character or a
combination of any two) as D, N, or S to set
the optional modules to be included in the
subset
o is specified as O to indicate that obsolete
language elements are to be flagged
Abbreviations: None
IBM-default: NOFLAGSTD
FLAGSTD is designed to provide information (via flagging) about the type of
COBOL elements included in the source program. Based on the way in
which the subparameters are coded, this can include flagging for non-
conforming, non-standard, and/or obsolete language elements.
NOCMPR2 and the standard set of reserved words must be in effect in order to
use FLAGSTD.
The sub-parameters are further described below:
For s: M specifies that language elements not from
the minimum subset are to be flagged (i.e., as non-conforming standard)
For mm: D specifies that elements from Debug module level 1 are not
flagged (i.e., as non- conforming standard)
STEPLIB DD:
Partitioned data set containing the executable form of the compiler. (This
may be installation dependent.)
SYSLIB DD:
Partitioned data set containing copy members. Required if programs to be
compiled contain any COPY or BASIS statements.
SYSPRINT DD:
Provides a definition of the data set that receives printed output from the
compiler. This includes the source listing, diagnostic messages, etc. Must
have RECFM=F or FB. BLKSIZE can be any permissable value for the output
device (up to 32760) that is a multiple of 133.
SYSTERM DD:
Provides definition of a second data set on which diagnostic messages are to
be output. Only required when the TERMINAL compiler option is specified.
Must have RECFM=F or FB. BLKSIZE can be any permissable value for the
output device (up to 32670) that is a multiple of 81.
SYSUT1-SYSUT7:
Provides definitions of various compiler work files. These files must be on
direct-access storage devices and must have RECFM=F or FB. BLKSIZE can
be any permissable value for the output device (up to 32760) that is a multiple
of 80.
SYSLIN DD:
Provides a definition of the output data set that is used for the object
module. Must have RECFM=F or FB. BLKSIZE can be any permissable value
for the output device (up to 32760) that is a multiple of 80.
SYSIN DD:
Provides a definition of the input data set that contains the source
program(s) to be compiled. Must have RECFM=F or FB. BLKSIZE can be
any permissable value for the input device (up to 32670) that is a multiple of
80.
Rather than specifying all of the required JCL shown above, you may prefer to
invoke the VS COBOL II compiler by executing one of the IBM-supplied
cataloged procedures for this purpose (i.e., COB2UC, COB2UCL, COB2CLG, etc.)
or some other cataloged procedure provided by your systems programming or
technical support staff. (Check with your manager or technical support staff for
direction on which cataloged procedure to use.)
Examples of the JCL required to invoke the compiler (and selected options) are
shown and described below:
//JS10 EXEC PGM=IGYCRCTL, Compiler Program Name
// PARM=(LIST,MAP,XREF) Optional Parms
//STEPLIB DD DSN=SYS1.COB2COMP,DISP=SHR PDS Containing Compiler
//SYSLIB DD DSN=cpylib,DISP=SHR Copy Member Library
//SYSPRINT DD SYSOUT=* Printed Output
//SYSTERM DD SYSOUT=* Diagnostic Messages
//SYSUT1 DD UNIT=SYSDA,SPACE=(subparms) Work File
//SYSUT2 DD UNIT=SYSDA,SPACE=(subparms) Work File
//SYSUT3 DD UNIT=SYSDA,SPACE=(subparms) Work File
//SYSUT4 DD UNIT=SYSDA,SPACE=(subparms) Work File
//SYSUT5 DD UNIT=SYSDA,SPACE=(subparms) Work File
//SYSUT6 DD UNIT=SYSDA,SPACE=(subparms) Work File
//SYSUT7 DD UNIT=SYSDA,SPACE=(subparms) Work File
//SYSLIN DD DSN=&&OBJMOD,DISP=(MOD,PASS), Object Module Output
// UNIT=SYSDA,SPACE=(subparms)
//SYSIN DD * Source Program Input
source program...
/*
The example above shows sample JCL required to execute the compiler with the
following options:
LIST: to request an assembler-language listing of the generated
object code
MAP: to request a DATA DIVISION map
XREF: to request a sorted cross-reference listing
The example above shows sample JCL required to execute the compiler via the
COB2UC JCL procedure supplied by IBM. In this case, the following options
are specified:
OFFSET: to request a condensed PROCEDURE DIVISION listing
OUTDD: to request that execution time DISPLAY output use a
ddname of DSPOUT
LANGUAGE:
This is a COBOL compiler option.
Format: LANGUAGE(xxxxxx)
Abbreviations: LANG(xx)
IBM-default: LANGUAGE(ENGLISH)
LANGUAGE specifies the language that will be used for compiler messages
(i.e., for diagnostic messages, message summary headers, the
compilation summary, and various headers and notations resulting from
the use of compiler options like MAP, XREF, etc.).
The language sub-parameters that may be specified are shown below:
Sub-parameter Abbreviation Description
------------- ------------ ------------------------
LIB:
This is a COBOL compiler option.
Format: LIB NOLIB
Abbreviations: None
IBM-default: NOLIB
LIB, which conforms to the ANSI standard, instructs the compiler that it is to
honor and process COPY, BASIS, and REPLACE statements.
If COPY or BASIS statements are to be processed, the compile JCL must
include a dd statement for the library or libraries from which the compiler
can extract the copied code (i.e., SYSLIB) as well as the SYSUT5 work file.
LINECOUNT:
This is a COBOL compiler option.
Format: LINECOUNT(nn) Abbreviations: LC
IBM-default: LINECOUNT(60)
LINECOUNT specifies the number of lines to be printed on each page of the
compilation listing.
The nn sub-parameter must be an integer between 10 and 255. This includes
3 lines which are used for titles. If LINECOUNT is specified as
LINECOUNT(50), 47 lines of source code are printed on each page of the
output listing.
LINECOUNT may also be specified as LINECOUNT(0) in order to suppress
pagination (i.e., no page ejects are generated within the compilation listing).
LIST:
This is a COBOL compiler option.
Format: LIST NOLIST
Abbreviations: None
IBM-default: NOLIST
LIST requests that the compiler produce a listing of the generated
machine language object code (which is produced by printing out the
corresponding assembler-language source code).
LIST also provides information in the output listing about:
• Global tables
• Literal pools
• WORKING-STORAGE
MAP:
This is a COBOL compiler option.
Format: MAP NOMAP
Abbreviations: None
IBM-default: NOMAP
MAP requests that the compiler produce a listing of the items defined in the
DATA DIVISION (i.e., a DATA DIVISION “map”).
Other MAP output includes:
• Global tables
• Literal pools
• Nested program structure (and attributes)
If compiled with the NORENT option, MAP information includes the size of
WORKING-STORAGE and its location within the object code.
MAP output can be limited (i.e., turned on or off as required) through the
use of *CONTROL MAP and *CONTROL NOMAP statements placed in the DATA
DIVISION.
NAME:
This is a COBOL compiler option.
Format: NAME NAME(ALIAS) NONAME
(NOALIAS)
Abbreviations: None
IBM-default: NONAME
NAME and NAME(NOALIAS) request that a link-edit NAME card be generated
for each object module. NAME(ALIAS) requests that, in addition to a NAME
card, a link-edit ALIAS card be generated for each ENTRY statement contained
in the source program.
NUMBER:
This is a COBOL compiler option.
Format: NUMBER NONUMBER
Abbreviations: NUM NONUM
IBM-default: NONUMBER
NUMBER instructs the compiler to honor the line numbers embedded in
columns 1 through 6 of each source statement. The compiler will check
these columns to ensure that they contain numeric data and will sequence
check them according to numeric collating sequence (as opposed to
SEQUENCE, which checks them according to EBCDIC collating sequence).
When a line number is found to be out of sequence, a number one greater
than the number in the previous line will be assigned and sequence
checking then continues with the newly assigned line number. These line
numbers will also be referenced in error messages and in MAP, LIST, and
XREF listings.
If NUMBER is specified and COPY statements are used, the line numbers in
the source program should be coordinated with those in each referenced COPY
member.
NONUMBER, which conforms to the ANSI standard, specifies that line
numbers appearing in columns 1 through 6 (if any) are to be ignored. In this
case, the compiler generates a line number for each line in the source program
and uses these generated line numbers as references in error messages and
in MAP, LIST, and XREF listings.
NUMPROC:
This is a COBOL compiler option.
Format: NUMPROC(PFD)
(NOPFD)
(MIG)
Abbreviations: None IBM-default:
NUMPROC(NOPFD)
NUMPROC(NOPFD), which conforms to the ANSI standard, specifies that the
generated code is to perform invalid sign processing during run time. This will
result in increased run time and a larger object module.
NUMPROC(PFD) is a performance option which specifies that invalid sign
processing is not to be done. It should be used only if the data to be
processed agrees exactly with the following IBM system standards:
DATA FORMAT STANDARD SIGN FORMAT
----------------- ------------------------------------------
OBJECT:
This is a COBOL compiler option.
Format: OBJECT NOOBJECT
Abbreviations: OBJ NOOBJ
IBM-default: OBJECT
OBJECT requests that the generated object code be routed to the SYSLIN dd
statement.
NOOBJECT and TEST are mutually exclusive; NOOBJECT is ignored if TEST is
specified.
OFFSET:
This is a COBOL compiler option.
Format: OFFSET NOOFFSET
Abbreviations: OFF NOOFF
IBM-default: NOOFFSET
OFFSET requests that the compiler produce a condensed PROCEDURE
DIVISION listing. This condensed listing will contain line numbers,
statement references, and the location (i.e., offset within the object code)
of the first instruction generated for each statement. Other OFFSET output
includes:
• Global tables
• Literal pools
If compiled with the NORENT option, OFFSET information includes the size of
WORKING-STORAGE and its location within the object code.
OFFSET and LIST are mutually exclusive; if both are used, LIST is ignored.
OPTIMIZE:
This is a COBOL compiler option.
Format: OPTIMIZE NOOPTIMIZE
Abbreviations: OPT NOOPT
IBM-default: NOOPTIMIZE
OPTIMIZE specifies that the object code be generated for maximum efficiency.
This should result in reduced run time and may also reduce the size of the
object module. However, use of OPTIMIZE increases compile time.
OPTIMIZE is turned off whenever a severe error is detected.
OPTIMIZE and TEST are mutually exclusive; if TEST is specified, OPTIMIZE is
ignored. Given these facts (and the additional compile time consumed by
the OPTIMIZE option), it might be best to use NOOPTIMIZE while in initial
program development or debugging mode.
Use of OPTIMIZE along with NUMPROC(PFD), AWO, and FASTSRT (when
applicable) may result in significant run time savings.
OUTDD:
This is a COBOL compiler option.
Format: OUTDD(ddname) Abbreviations: OUT
IBM-default: OUTDD(SYSOUT)
OUTDD may be used to specify a ddname other than SYSOUT for run time
output produced by the DISPLAY verb.
RENT:
This is a COBOL compiler option.
Format: RENT NORENT
Abbreviations: None
IBM-default: NORENT
RENT specifies that the generated object code is to be reentrant.
NORENT specifies that the program be generated as a nonreentrant object
module. (This option should not be used for CICS programs.)
Reentrant object code can be executed only in run units where all programs
have been generated with the RESIDENT option. (RENT automatically forces
on RESIDENT).
RENT must be specified if the program will be executed under XA in virtual
storage addresses above the 16-meg line. In this case, the DATA option can
be used to control whether dynamic data areas are allocated in
unrestricted storage or from below the 16-meg line.
RENT automatically forces on RESIDENT and is not valid with NORESIDENT.
DYNAM automatically forces on RESIDENT and is not valid with NORESIDENT.
Outlined below are the 5 valid combinations of DYNAM, RESIDENT, and RENT:
NORENT/NORES/NODYNAM
Nonreentrant code, COBOL library subroutines are statically called, CALL
literal is a static call.
NORENT/RES/NODYNAM
Nonreentrant code, COBOL library subroutines are dynamically called,
CALL literal is a static call.
NORENT/RES/DYNAM
Nonreentrant code, COBOL library subroutines and application
subprograms are all dynamically called.
RENT/RES/NODYNAM
Reentrant code, COBOL library subroutines are dynamically called, CALL
literal is a static call.
RENT/RES/DYNAM
Nonreentrant code, COBOL library subroutines and application
subprograms are all dynamically called.
RESIDENT:
This is a COBOL compiler option.
Format: RESIDENT NORESIDENT
Abbreviations: RES NORES
IBM-default: NORESIDENT
RESIDENT, which conforms to the ANSI standard, specifies that the COBOL
Library Management Feature be invoked. This causes most COBOL library
subroutines to be loaded dynamically at run time rather than being statically
link-edited into the run unit. (This allows for application programs to
automatically pick up any fixes applied to the library subroutines without
having to be link-edited again.) This option requires that the VS COBOL II
subroutine library be included in the JOBLIB/STEPLIB concatenation at
run time.
NORESIDENT, if used when compiling each COBOL program in the run unit,
specifies that the load module contain all required VS COBOL II library
subroutines needed for execution. In this case, the VS COBOL II subroutine
library need not be included in the JOBLIB/STEPLIB concatenation.
The RESIDENT option is automatically in effect when the DYNAM option is
specified or when the source program uses CALL identifier (i.e., a CALL
statement where the program to be called is specified in the form of an
identifier rather a literal).
Use of the VS COBOL II Library in conjunction with an OS/VS COBOL
program compiled with the RESIDENT option may result in significant
performance degradation at run time.
For more information on the interaction of RESIDENT and other compiler
options, see the RENT option.
SEQUENCE:
This is a COBOL compiler option.
Format: SEQUECNE NOSEQUENCE
Abbreviations: SEQ NOSEQ
IBM-default: SEQUENCE
SEQUENCE instructs the compiler to ensure that the source program
lines are in ascending EBCDIC collating sequence based on the information
coded in columns 1 through 6. (Source program lines containing spaces in
columns 1 through 6 are not checked.)
If NUMBER is also specified, the sequence checking is based on the numeric
(rather than the EBCDIC) collating sequence.
If SEQUENCE is specified and COPY statements are used, the source
program line numbers should be coordinated with the line numbers in each
referenced COPY member.
NOSEQUENCE, which conforms to the ANSI standard, suppresses this
sequence checking.
SIZE:
This is a COBOL compiler option.
Format: SIZE(nnnn)
(nnnK)
(MAX)
where nnnn is a decimal number no less than 655360
nnnK is a decimal number in 1K (1024) increments
with a minimum value of 640K
MAX requests the largest block of storage
available in the user region Abbreviations: SZ
IBM-default: SIZE(MAX)
SIZE specifies the amount of main storage to be made available for the
compile process.
In an XA environment, SIZE(MAX) will cause the compiler to use all the
storage in the user region above the 16-meg line. (Storage below the 16-
meg line will be used for compiler modules that must be loaded below the line
and for work file buffers.)
SIZE(MAX) should not be used if there is a need for the compiler to leave a
specific amount of unused storage in the user region.
SOURCE:
This is a COBOL compiler option.
Format: SOURCE NOSOURCE
Abbreviations: S NOS
IBM-default: SOURCE
SOURCE requests that the compiler produce a listing of the input source
program (including statements brought in by COPY or PROCESS
statements).
SOURCE must be specified in order to get embedded diagnostics.
SOURCE output can be limited (i.e., turned on or off as required)
through the use of *CONTROL SOURCE and *CONTROL NOSOURCE
statements placed in the source program.
SPACE:
This is a COBOL compiler option.
Format: SPACE(1)
(2)
(3)
Abbreviations: None IBM-default: SPACE(1)
SPACE, which is meaningful only when SOURCE is specified, sets the (single,
double, or triple) spacing to be used between the printed lines in the source
code listing.
SSRANGE:
This is a COBOL compiler option.
Format: SSRANGE NOSSRANGE
Abbreviations: SSR NOSSR
IBM-default: NOSSRANGE
SSRANGE specifies that the generated code is to check to ensure that:
• the effective address generated for an index or subscript does not
reference an area outside the region of the associated table
• the current effective length for a variable-length item (i.e., OCCURS
DEPENDING ON) is no greater than its maximum defined length
• for reference modification expressions:
• the reference modification starting position is no less than 1 and no
greater than the current length of the subject item
• the reference modification length value (if specified) is no less
than 1
• the reference modification starting position and length value (if
specified) do not reference an area that extends beyond the end
of the subject item
TERMINAL:
This is a COBOL compiler option.
Format: TERMINAL NOTERMINAL
Abbreviations: TERM NOTERM
IBM-default: NOTERMINAL
TERMINAL requests that a copy of each diagnostic message be sent to the
SYSTERM data set.
NOTERMINAL suppresses this duplicate output.
TEST:
This is a COBOL compiler option.
Format: TEST NOTEST
Abbreviations: TES NOTES
IBM-default: NOTERMINAL
TEST requests that the compiler produce object code that can be executed
with VS COBOL II batch or interactive debug.
The following options are forced on when TEST is specified:
NOFDUMP, NOOPTIMIZE, OBJECT, and RES.
If NUMBER is also specified, the sequence fields in columns 1 through 6
must be numeric.
If both the WITH DEBUGGING MODE clause and the USE FOR DEBUGGING
statement are specified, then TEST is deactivated. (TEST will appear in the
options list; however, a diagnostic message will be issued to indicate that,
because of the conflict, TEST is not in effect.)
Using TEST can result in significant performance degradation at run time.
TRUNC:
This is a COBOL compiler option.
Format: TRUNC(STD)
(OPT)
(BIN)
Abbreviations: None IBM-default:
TRUNC(STD)
TRUNC(STD), which conforms to the ANSI standard, specifies that, for USAGE
BINARY receiving fields, the final result of an arithemetic expression or
MOVE statement is truncated to the number of digits in the PICTURE clause of
the BINARY receiving field.
TRUNC(OPT), which is provided as an IBM extension, is a performance
option which causes the compiler to assume that data being moved to a
USAGE BINARY receiving field conforms to the associated PICTURE clause.
For this reason, the data will be truncated in what appears to the compiler to
be the most optimal way at the time the code is being generated. This
means that the truncation may be based on the number of digits in the
PICTURE clause or it might be based on the actual physical size of the binary
field in storage (i.e., as a halfword, fullword, or doubleword). If the data
being moved has a value with a larger precision than that defined in the
PICTURE clause, an unpredictable truncation of high order digits may
occur.
Since the type of truncation generated for TRUNC(OPT) is unpredictable,
TRUNC(OPT) should be used only if the data being moved to binary items is
guaranteed not to have a value with a larger precision than that defined by
the PICTURE clause for those binary items.
TRUNC(BIN), which is provided as an IBM extension, specifies that all
binary items (no matter how many digits are shown in their PICTURE clause)
are to be treated as a halfword, fullword, or doubleword. (The number of
digits in the PICTURE clause is used only to determine the minimal binary field
-i.e., halfword, fullword, doubleword- requried to store the item.) This
means, once the physical size of the field is determined, that it is treated
as a halfword, fullword, or doubleword both when processed as a
sending field and when processed as a receiving field. In this case then, the
only way to lose significant digits is to move a larger binary field to a
smaller binary field (i.e., fullword to halfword, etc.).
TRUNC(BIN) should be used when there is a possibility of having more than
9 digits in a fullword or more than 4 digits in a halfword. (Specifying a
PICTURE clause for a binary item with more than 4 digits forces it into a
fullword. However, a halfword can contain some numbers of up to 5 decimal
digits and a fullword can contain some numbers of up to 10 decimal digits.)
TRUNC(BIN) should also be used when interfacing with other languages or
products that have S/370 format binary data (i.e., PL/1, FORTRAN, S/370
assembler, CICS, DB2, etc.).
For the MOVE statement shown below:
MOVE 32700 TO BINFIELD1.
where BINFIELD1 is defined as:
*Depends upon how the compiler generates the truncation logic in this
particular case.
VBREF:
This is a COBOL compiler option.
Format: VBREF NOVBREF
Abbreviations: None
IBM-default: NOVBREF
VBREF requests that the compiler produce a cross-reference showing all
verb types used in the source program and the line numbers of the lines in
which they appear. A summary showing how many times each verb is used
is also produced.
WORD:
This is a COBOL compiler option.
Format: WORD(wwww) NOWORD
Abbreviations: WD NOWD
IBM-default: NOWORD
WORD instructs the compiler to use an alternative reserved word table for the
current compilation.
The wwww sub-parameter specifies the (up to 4) characters that are to be
appended to ‘IGYC’ to form the name of the reserved word table to be used.
These 4 characters may not include the dollar sign ($) nor any of the
character strings listed below:
ASM1 ASM2 DIAG DMAP DOPT FGEN INIT LIBO LIBR
LSTR LVL0 LVL1 LVL2 LVL3 LVL8 OPTM OSCN PGEN
RCTL RDPR RDSC RWT SAW SCAN SIMD XREF
ZWB:
This is a COBOL compiler option.
Format: ZWB NOZWB
Abbreviations: None
IBM-default: ZWB
ZWB, which conforms to the ANSI standard, specifies that the compiler
generate code to remove the sign from a signed external decimal field when
comparing such a field to an alphanumeric field.
For the two fields defined below (with their hex values shown to the right):
Hex Value
---------
FIELDA PIC S9(3) VALUE +123. F1F2C3
FIELDB PIC X(3) VALUE ‘123’. F1F2F3
Compiling with ZWB would result in the two fields above being considered
equal in value when compared; NOZWB would result in an unequal
comparison.