Perform the following steps for compiling your Enterprise PL/I
Version 3.5 and Version 3.6 programs:
- Create a library (PDSE is suggested unless PDS is required for
your organization) for SYSDEBUG files. This is only needed in test
environments where debugging will be performed using LRECL=(80
to 1024),RECFM=FB,BLKSIZE=(multiple of lrecl < 32K).
- Allocate one or more LANGX libraries for each environment, such
as test and production.
- Create a corresponding LANGX library for each load library. Specify LRECL=1562
or greater,RECFM=VB,BLKSIZE= lrecl+4 to 32k.
- Run a two-stage compile. The first stage preprocesses the program,
so the IBM Problem Determination Tools products have access to fully
expanded source code with INCLUDEs and macros. The second stage compiles
the program. For all programs, such as batch, CICS, and IMS:
- In the first compile stage, in both test and
production environments, specify compiler options MACRO,MDECK,NOCOMPILE,NOSYNTAX,INSOURCE to
expand INCLUDEs and macros. The output SYSPUNCH DD will be the input
SYSIN DD to the second compile stage.
- In the second compile stage, in test environments,
- When using the Enterprise PL/I Version 3.5 compiler:
For all
programs, specify the following compiler options: TEST(ALL,SYM,NOHOOK,SEPARATE),
NOPT, AGGREGATE, ATTRIBUTES(FULL), NOBLKOFF, LIST, MAP, NEST, NONUMBER,
OFFSET, OPTIONS, SOURCE, STMT, XREF(FULL).
- When using the Enterprise PL/I Version 3.6 compiler:
For all
programs, specify the following compiler options: TEST(ALL,SYM,NOHOOK,SEPARATE,SEPNAME),
NOPT, AGGREGATE, ATTRIBUTES(FULL), NOBLKOFF, LIST, MAP, NEST, NONUMBER,
OFFSET, OPTIONS, SOURCE, STMT, XREF(FULL).
TEST(…) and NOPT are required
by Debug Tool.
The SEPARATE sub-option
produces a SYSDEBUG file. Save the SYSDEBUG file created by the compiler
for Debug Tool (and optionally, Fault Analyzer).
The
other options format the compiler listing as required for the xxxLANGX utility.
Consider using TEST(ALL,SYM,NOHOOK,SEPARATE) for
best performance and to produce a module that can be debugged. Depending
on the policies in your organization, the module can be considered
for production.
- In the second compile stage, in production environments,
specify compiler options NOTEST, AGGREGATE, ATTRIBUTES(FULL),
NOBLKOFF, LIST, MAP, NEST, NONUMBER, OFFSET, OPTIONS, SOURCE, STMT,
XREF(FULL).
Note: The above options can be used with
both the Enterprise PL/I Version 3.5 and Version 3.6 compilers.
NOTEST disables Debug Tool, but produces a smaller
load module.
The other options format the compiler listing as
required for the xxxLANGX utility to produce
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 for z/OS).
When a
TEST(…SEPARATE) parm
is used, code a SYSDEBUG DD in the second compiler step as follows:
//SYSDEBUG DD DSN= sysdebug.pds(pgmname),DISP=SHR
This
is the source information file for IBM Debug Tool for z/OS, IBM Application
Performance Analyzer for z/OS and optionally, IBM Fault Analyzer for
z/OS. Save it in the SYSDEBUG library, and specify a member name that
is equal to the primary entry point name or CSECT name of your application
program.
- Modify the SYSPRINT DD in the second compiler stage. This is the
compiler listing. Write the listing to either a permanent or temporary
file. This is 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 IBM Application Performance Analyzer
for z/OS or IBM Fault Analyzer for z/OS. Instead, use the primary
entry point name.
- Add a step after the compile step to run the xxxLANGX
utility. This utility reads the compiler listing and generates a LANGX
file. This is the source information file for IBM Fault Analyzer for
z/OS and IBM Application Performance Analyzer for z/OS. Equivalent xxxLANGX utilities are available in IBM Debug
Tool for z/OS as EQALANGX, in IBM Fault Analyzer for z/OS as IDILANGX
and in IBM 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 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.
- If you compile with the TEST option and will promote these modules
into production, promote the SYSDEBUG file for your production environment.
- 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.