Perform the following steps for compiling your Enterprise PL/I
Version 3.4 and earlier programs:
- Create a library (PDSE is suggested unless PDS is required for
your organization) for expanded source files. This is only needed
in test environments where debugging will be performed. The library
can be any RECFM / LRECL / BLKSIZE supported as input by the compiler.
- Allocate libraries (PDSE is suggested unless PDS is required for
your organization) for LANGX files. Allocate one or more LANGX libraries
for each environment, such as test or production.
- Create a corresponding LANGX library for each load library. Specify LRECL=1562
or greater,RECFM=VB,BLKSIZE= lrecl+4 to 32k.
- Run a 2–stage compile. The first stage preprocesses the
program, so the IBM Problem Determination Tools have access to fully
expanded source code with INCLUDEs and macros. The second stage compiles
the program.
- In the first compile stage, in both test and production environments:
- Specify compiler options MACRO,MDECK,NOCOMPILE,NOSYNTAX,INSOURCE to
expand INCLUDEs and macros.
- Save the output, the expanded source file, in a permanent file
in the expanded source file library and specify member
name = program name. This is the source
information file for Debug Tool for z/OS. The output SYSPUNCH DD will
be the input SYSIN DD to the second compiler stage.
- In the second compile stage, for all programs, such as batch,
CICS, and IMS:
- In test environments, specify compiler options TEST(ALL),
NOPT, AGGREGATE, ATTRIBUTES(FULL), NOBLKOFF, LIST, MAP, NEST, NONUMBER,
OFFSET, OPTIONS, SOURCE, STMT, XREF(FULL).
TEST(ALL) and NOPT are
required by Debug Tool. Debug hooks are inserted, which add some runtime
overhead. Symbolic data required by Debug Tool is also stored in the
module, which can make it significantly larger.
The
other options format the compiler listing as required for the xxxLANGX utility.
- In production environments, specify compiler
options NOTEST, AGGREGATE, ATTRIBUTES(FULL), NOBLKOFF, LIST,
MAP, NEST, NONUMBER, OFFSET, OPTIONS, SOURCE, STMT, XREF(FULL)).
NOTEST disables
Debug Tool, but provides the best performance. This produces a production-ready
module that can be used with Fault Analyzer for z/OS and Application
Performance Analyzer for z/OS (but not Debug Tool).
The other options format the compiler listing as
required for the xxxLANGX utility.
- Modify the SYSPRINT DD in the second compiler stage. This is the
compiler listing. Save the compiler listing to either a permanent
or temporary file. This will be the input to the xxxLANGX
utility.
Note: This compiler typically renames
CSECTs according to an internal compiler algorithm. Therefore, it
is not recommended to store PL/I compiler listings or side files using
CSECT names as they might not be found by Application Performance
Analyzer for z/OS or Fault Analyzer for z/OS. Instead, use the primary
entry point name.
- Add a step after the compiler step to run the xxxLANGX
utility. The xxxLANGX utility reads the compiler
listing and generates a LANGX file, which is the source information
file for Fault Analyzer for z/OS and Application Performance Analyzer
for z/OS. Equivalent xxxLANGX utilities are
available in Debug Tool for z/OS as EQALANGX, in Fault Analyzer for
z/OS as IDILANGX and in Application Performance Analyzer for z/OS
as CAZLANGX. Save the LANGX file in the LANGX file library, and specify
a member name that is equal to the primary entry point name or CSECT
name of your application program.
- Modify the promotion process to promote LANGX files. When a load
module is promoted, for example, from test to production, promote
the corresponding LANGX file or files. A promotion can be a recompile,
copy, or move. Perform the same steps with the LANGX file that you
perform with the module during promotion.
- Optionally, include a Debug Tool Language Environment exit module
into the load module during the linkage editor step. This is one way
to enable Debug Tool’s panel 6 in ISPF, a simple panel-driven
method to start the debugger automatically when a program runs, without
JCL changes, 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.
- For CICS applications only, if the Debug Tool DTCN transaction
will be used to start Debug Tool, link edit the Debug Tool CICS startup
exit module EQADCCXT into the application load module to enable Debug
Tool in CICS. This is not needed if using the CADP transaction instead
of DTCN.