MDECK
The MDECK
compiler option specifies that a copy of the
updated input source after library processing (that is, the result of
COPY
, BASIS
, REPLACE
, EXEC SQL
INCLUDE
, EXEC SQLIMS INCLUDE
, and
conditional compilation directive statements) is written to a file.
If Enterprise COBOL is running under z/OS® UNIX, the MDECK
output is written in the current
directory to a file that has the same name as the COBOL source file and a suffix of
.dek
. For Enterprise COBOL running under TSO or batch,
the MDECK
output is written to the data set defined by the SYSMDECK
DD
allocation, which must specify an MVS™ data set that
has RECFM F
or FB
and an LRECL
of 80 bytes.
SYSMDECK
data set allocation for all
compilations, no matter if you specify the MDECK or NOMDECK option. The SYSMDECK DD
allocation can be specified as either a temporary dataset or a permanent cataloged/uncatalogued data
set.Default is: NOMDECK
Abbreviations are: NOMD | MD | MD(C | NOC)
Option specification:
You cannot specify the MDECK
option in a PROCESS
(or
CBL
) statement. You can specify it only in one of the following ways:
- In an
OPTFILE
(as long as theOPTFILE
is not specified in aPROCESS
orCBL
statement) - In the
PARM
parameter of JCL - As a
cob2
command option - As an installation default
- In the
COBOPT
environment variable
Suboptions:
- When
MDECK(COMPILE)
is in effect, compilation continues normally after library processing and generation of theMDECK
output file have completed, subject to the settings of theCOMPILE
|NOCOMPILE
,DECK
|NODECK
, andOBJECT
|NOOBJECT
compiler options. - When
MDECK(NOCOMPILE)
is in effect, compilation is terminated after library processing has completed and the expanded source program file has been written. The compiler does no further syntax checking or code generation regardless of the settings of theCOMPILE
,DECK
, andOBJECT
compiler options.
If you specify MDECK
with no suboption, MDECK(COMPILE)
is
implied.
Contents of the MDECK
output file:
If you use the MDECK
option with programs that contain EXEC
CICS
, EXEC SQL
, or EXEC SQLIMS
statements,
these EXEC
statements are included in the MDECK
output as is.
However, if you compile using the SQL
or SQLIMS
option, the corresponding
EXEC SQL INCLUDE
or EXEC SQLIMS INCLUDE
statements
are expanded in the MDECK
output.
CBL
, PROCESS
, *CONTROL
, and
*CBL
card images are passed to the MDECK
output file in the proper
locations.
For a batch compilation (multiple COBOL source programs in a single input file), a single
MDECK
output file that contains the complete expanded source is created.
Any SEQUENCE
compiler-option processing is reflected in the
MDECK
file.
COPY
statements are included in the MDECK
file as comments.
Starting the compiler from an assembler program
Defining the library-processing output file (SYSMDECK)