Preparing COBOL for MVS™ and VM programs
Perform the following steps for compiling your COBOL for MVS™ and VM programs:
- Create libraries (PDSE is suggested unless PDS is required in your organization) for compiler listing files. Allocate one or more compiler listing libraries for each environment, such as test and production.
- Create a corresponding listing library for each load library.
Specify
LRECL=133,RECFM=FBA,BLKSIZE=(multiple of lrecl < 32K)
. - For all programs, such as batch, CICS®,
and IMS™:
- In test environments, specify compiler options
TEST(ALL,SYM),NOOPT,LIST,MAP,SOURCE,NONUMBER,XREF(SHORT)
to create a module that can be used with z/OS® Debugger, Fault Analyzer for z/OS® and Application Performance Analyzer for z/OS®.TEST
is required for z/OS® Debugger.The
ALL
suboption adds debug hooks, which add some runtime overhead.SYM
stores symbolics data that is required by z/OS® Debugger into the module, which can make it significantly larger.The other options format the compiler listing as required by z/OS® Debugger, Fault Analyzer for z/OS®, and Application Performance Analyzer for z/OS®.
- In production environments, specify compiler options
NOTEST,LIST,MAP,SOURCE,NONUMBER,XREF(SHORT)
to create a production-ready module that can be used with Fault Analyzer for z/OS® and Application Performance Analyzer for z/OS® (but not z/OS® Debugger). SpecifyOPTIMIZE
if preferred.NOTEST
disables source level debugging with z/OS® Debugger, but can provide better performance and smaller module size.The other options (except
OPTIMIZE
) format the compiler listing as required by Fault Analyzer for z/OS® and Application Performance Analyzer for z/OS®.
- In test environments, specify compiler options
- Modify the SYSPRINT DD in the JCL of the compiler step to refer to a file.
Save the compiler listing in a file in the compiler listing library and specify a member name that is equal to the program name of your application program. This file is the source information file for z/OS® Debugger, Fault Analyzer for z/OS® and Application Performance Analyzer for z/OS®.//SYSPRINT DD DSN= compiler.listing.pds(pgmname),DISP=SHR
- Modify the promotion process to promote compiler listing files. When a load module is promoted, for example, from test to production, promote the corresponding compiler listing file or files. A promotion can be a recompile, a copy, or a move. Perform the same steps with the compiler listing file that you perform with the module during promotion.
- Optionally, include a z/OS® Debugger Language Environment® exit module
into the load module during the linkage editor step. This inclusion
is one way to enable z/OS® Debugger panel 6
in ISPF, a simple panel-driven method to start the debugger automatically
when a program runs, without JCL changes, that is based on the program
name and user ID. Use module EQADBCXT for batch programs (including IMS™ batch), EQADICXT for IMS/TM programs
and EQADDCXT for DB2® stored
procedures. Do not include the exit module for CICS® programs.
You can also use module EQAD3CXT for batch programs, IMS/TM, IMS™ BTS programs, and DB2® type MAIN stored procedures.