Preparing Enterprise PL/I Version 3.7 and later programs

Perform the following steps for compiling your Enterprise PL/I Version 3.7 and later programs:

  1. 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).
  2. Allocate one or more LANGX libraries for each environment, such as test and production.
  3. Create a corresponding LANGX library for each load library. Specify LRECL=1562 or greater,RECFM=VB,BLKSIZE= lrecl+4 to 32k.
  4. For all programs, such as batch, CICS, and IMS:
    • In test environments:
      • When using the Enterprise PL/I Version 3.7 compiler:

        For all programs, specify the following compiler options: TEST(ALL,SYM,NOHOOK,SEPARATE,SEPNAME,AALL), NOPT, AGGREGATE, ATTRIBUTES(FULL), NOBLKOFF, LIST, MAP, NEST, NONUMBER, OFFSET, OPTIONS, SOURCE, STMT, XREF(FULL).

      • When using the Enterprise PL/I Version 3.8 and later compilers:

        For all programs, specify the following compiler options: TEST(ALL,SYM,NOHOOK,SEPARATE,SEPNAME), LISTVIEW(AALL), 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 IBM Debug Tool for z/OS and optionally, IBM Fault Analyzer for z/OS.

      The AALL (AFTERALL) sub-option of TEST or LISTVIEW stores program source information in the SYSDEBUG file that contains information after the last preprocessor, such as macros and INCLUDEs. This expanded source information is available in the source window of IBM Debug Tool for z/OS while debugging.

      The other options format the compiler listing as required for the xxxLANGX utility.

      Consider using the TEST(ALL,NOHOOK,SEPARATE) options 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 production environments:
      • When using the Enterprise PL/I Version 3.7 or later compiler:

        For all programs, specify NOTEST, AGGREGATE, ATTRIBUTES(FULL), NOBLKOFF, LIST, MAP, NEST, NONUMBER, OFFSET, OPTIONS, SOURCE, STMT, XREF(FULL).

      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 IBM Fault Analyzer for z/OS and IBM Application Performance Analyzer for z/OS (but not IBM Debug Tool for z/OS).

  5. When a TEST(…SEPARATE) option 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, 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.
  6. Modify the SYSPRINT DD in the compiler step. 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.
  7. 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.
  8. 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.
  9. If you compile with the TEST option and will promote these modules into production, promote the SYSDEBUG file for your production environment.
  10. 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.