This section describes dump options and syntax used to call PLIDUMP, and describes PL/I-specific information included in the dump that can help you debug your programs.
This shows an example of a PL/I routine calling PLIDUMP to produce a Program Environment dump. In this example, the main routine PLIDMP calls PLIDMPA, which then calls PLIDMPB. The call to PLIDUMP is made in routine PLIDMPB.
%PROCESS MAP GOSTMT SOURCE STG LIST OFFSET LC(101);
PLIDMP: PROC OPTIONS(MAIN) ;
Declare (H,I) Fixed bin(31) Auto;
Declare Names Char(17) Static init('Bob Teri Bo Jason');
H = 5; I = 9;
Put skip list('PLIDMP Starting');
Call PLIDMPA;
PLIDMPA: PROC;
Declare (a,b) Fixed bin(31) Auto;
a = 1; b = 3;
Put skip list('PLIDMPA Starting');
Call PLIDMPB;
PLIDMPB: PROC;
Declare 1 Name auto,
2 First Char(12) Varying,
2 Last Char(12) Varying;
First = 'John';
Last = 'Thompson';
Put skip list('PLIDMPB Starting');
Call PLIDUMP('TBFC','PLIDUMP called from procedure PLIDMPB');
Put Data;
End PLIDMPB;
End PLIDMPA;
End PLIDMP;
This example is referenced throughout this section.
Consider the following when using PLIDUMP:
- Use a unique user-identifier for each PLIDUMP invocation when calling PLIDUMP a number of times in a routine. This simplifies identifying the beginning of each dump.
- A DD statement with the ddname PLIDUMP can be used to define the data set for the dump. Any data set defined by these DD statements should specify a logical record length (LRECL) of at least 300/304 to prevent dump records from wrapping. If using SYSOUT as the target in any of these DDs, specify
MSGFILE(SYSOUT,FBA,300,0) or
MSGFILE(SYSOUT,VBA,304,0) to prevent line wrapping.
- If you want the program unit name, program unit address, and program unit offset listed correctly in the dump traceback table, compile your PL/I program with the
-debug option. The
-debug option can be used with the
-opt or
-opt3 options. To get symbols and line information in the dump, you must compile using the
-debug option to generate the
.stb files.
- Generated
.stb files should either be stored in the same location as the
.exe,
.dll or
.so files. or in a location specified by the environment variable
CODEWATCH_STBPATH. Otherwise the dump generated by PLIDUMP contains much less useful information.
- On Windows platforms, an additional
.pdb file must also be stored in one of the concatenated directories referenced by the
CODEWATCH_STBPATH environment variable or stored in the same location as the
.dll it is associated with. Otherwise a S0C4 abend may occur while trying to process the call stack when running under Enterprise Server.
Using PLIDUMP to generate a dump of your PL/I routine helps to ensure portability across system platforms.