The MDECK compiler option specifies that output from library processing (that is, expansion of COPY,
BASIS, REPLACE, or EXEC SQL INCLUDE statements) is written to a file.
When 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 statement, which must specify an MVS data set that has RECFM F or FB and an LRECL of 80 bytes.
MDECK option syntax

Default is: NOMDECK
Abbreviations are: NOMD, MD, MD(C), MD(NOC)
Suboptions:
- When MDECK(COMPILE) is in effect, compilation continues normally after library processing and generation of the
MDECK output file have completed, subject to the settings of the COMPILE|NOCOMPILE, DECK|NODECK, and OBJECT|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 the
COMPILE, DECK, and OBJECT compiler options.
When you specify MDECK with no suboption, MDECK(COMPILE) is implied.
Option specification:
You cannot specify MDECK in a PROCESS or CBL statement.<>
You can specify the option only by using:
- The PARM parameter in JCL
- A cob2 command option
- An installation default
- The COBOPT environment variable
Contents of the MDECK output file:
When you use the MDECK option with the CICS compiler option (integrated CICS translator) or the SQL compiler option (DB2 coprocessor),
in general, EXEC CICS or EXEC SQL statements in the COBOL source program are included in the MDECK output as is.
However, EXEC SQL INCLUDE statements are expanded in the MDECK output in the same manner as COPY statements.
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.
© Copyright IBM Corp.