Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Preparing a Program for Execution (Code Debug CICS PL/I)


It is possible to debug a program without any preparation other than entering XPED and your program name. You work at the operation-code level, set breakpoints and examine program storage using offsets. This process is called sourceless debugging. Sourceless debugging is valuable when working with programs that can’t be recompiled, such as vendor packages or production versions of programs.

For examples of sourceless debugging, see Debugging Applications Without Source Code (Code Debug CICS PL/I).

The typical method of debugging programs, however, is to use Code Debug’s source-level support for PL/I.

To take advantage of this support, you must run your PL/I programs through the PL/I language processor, which provides you with the following functionality during a debugging session:

  • Set one or more breakpoints to stop execution at any statement. Breakpoints may be:

Unconditional: Halts program execution at the selected statement.

Conditional: Halts program execution only if the specified condition is met.

  • Examine program storage by data name.
  • Select data fields for viewing during program execution.
  • Resume execution at any statement.
  • Change the execution point by statement number.
  • Examine the statement-level trace during or after execution.

Important

Certain PL/I verbs—DO, for example—may compile without generating any executable code. If you use the Source Listing screen (2.L) to set a breakpoint on a statement containing one of these verbs, the breakpoint will actually be placed on the next executable line. If a conditional breakpoint already exists on that line, Code Debug will disallow the newer breakpoint and issue an error message.

Language processing lets you work with the code in the way you are accustomed to seeing it: at the source level. The next section discusses the BMC language processor and how to get source-level support.

The BMC Language Processor

The BMC language processor is a set of programs that captures information about a compiler listing and stores it in a source listing file, also known as a DDIO file. You have the option to use either the preprocessor or the postprocessor. As certain information is not available from the compiler listing, Code Debug CICS recommends that you use the preprocessor when installing Release 17.02 because it gathers additional information and provides you with the following benefits:

  • Simplified JCL: While the postprocessor requires that the user add a step after the compile step, the preprocessor requires only that the EXEC name be altered and a CWPDDIO DD card and CWPPRMO DD card be added.
  • Automated print options: The postprocessor requires that certain compiler options be specified in order to print all needed sections of the compiler listing. The preprocessor can automatically pass the required options to the compiler.
  • Capturing of suppressed source code: When PL/I %NOPRINT is used, sections of source code can be suppressed from the compiler listing. The preprocessor can capture this information from the compiler before the data is suppressed from the listing. This provides improved debugging under CICS.

To enable source-level support, the language processor must be installed. The most up to date version of BMC AMI Common Shared Services (a component of BMC AMI Enterprise Common Components) is furnished with Code Debug CICS and is usually installed as part of the Code Debug installation process. For information on how to install the BMC AMI Common Shared Services language processor, see Code Debug CICS Installation and Configuration space and the Enterprise Common Components Installation and Configuration space.

During a debugging session, Code Debug CICS searches the source listing file for an entry that matches your program name. It also checks the compile date and time. For Assembler and PL/I, if no compile date and time are found in the load module, Code Debug checks the ASMSTMP or PL1STMP parameter in the global table. If the parameter is set to YES (the default), the NO SOURCE AVAILABLE message is displayed. Press the help PF key (default PF1) for specific information. If the parameter is set to NO, Code Debug bypasses timestamp validation and continues. For more information on these parameters and how to create a timestamp in Assembler and PL/I programs, see Configuration Parameters in the Code Debug CICS Advanced Configuration Guide.

Using the NEWCOPY Function

Whenever a program is recompiled, a new copy of the program must be loaded in CICS before attempting to test the recompiled version with Code Debug CICS. The Code Debug NEWC transaction should be used instead of the CEMT transactions to load a new copy of a program into CICS.

The NEWC transaction loads a new copy and resets generic breakpoints. Generic breakpoints are those set without reference to a specific statement number or offset, such as those created by the commands BEFORE ALL PARA and AFTER ALL EXEC. Explicit, non-generic breakpoints are set with commands such as BEFORE 100 and AFTER +24 — as well as the line commands B, A, and C — and are deleted from the new copy of the program created with the NEWC transaction.

To use the NEWC transaction, type NEWC followed by the program name on a blank CICS screen. If the NEWCOPY is successful, the following message is displayed:

NEWC CWDEMCB2
MXDNC0001I 01 Jan 2006 09:00:00 - SYSID=C123 - APPLID=CICSC123
Program 'CWDEMCB2' newcopy successful Len(00021E8)..

The program name in the first line of the message may be overtyped to issue an additional NEWCOPY request.

If the program is in use or the program name is entered incorrectly, error messages are returned. Any authorized user in the region can NEWCOPY a program; if the program is in use, an error message is issued, but the program is not disabled.

For more information on the NEWCOPY function, see Code Debug CICS Reference Manual.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*