You can obtain a CL procedure dump during procedure processing.
The CL procedure dump consists of a listing of all messages on
the procedure's message queue and the values of all variables used in the
procedure. This information may be useful in determining the cause of a problem
affecting procedure processing.
To obtain a CL procedure dump, do one
of the following:
- Run the Dump CL Program (DMPCLPGM) command. This command
can only be used in a CL procedure and does not end the CL procedure.
- Enter D in response to inquiry message CPA0701 or CPA0702. The system
sends this message whenever it receives an unmonitored escape message from
a CL procedure. If the program is running in an interactive job, the system
sends the message to the job's external message queue. If the program is running
as a batch job, the system sends the message to the system operator message
queue, QSYSOPR.
- Specify INQMSGRPY(*SYSRPYL) for the job. The IBM-supplied system reply
list specifies a reply of D for message CPA0702 or CPA0701. The system will
print a dump if it receives one of the inquiry messages.
- Change the default reply for message CPA0701 or CPA0702 from C (cancel
program) to D (dump procedure). This prints a procedure dump whenever a function
check occurs in a CL procedure. To change the default, enter the following
command:
CHGMSGD MSGID(CPA0702) MSGF(QCPFMSG) DFT(D)
Note: The security officer, or another user with update authority
to the QCPFMSG file, must enter the CHGMSGD command.
Changing the message default causes a dump to be printed under any
of the following conditions:
- The system operator message queue is in default mode and the message is
sent from a batch job.
- The display station user presses the Enter key without typing a response,
causing the message default to be used.
- INQMSGRPY(*DFT) is specified for the job.
1
5722SS1 V5R3M0 040201 Control Language MYLIB/DUMPER SYSNAME 05/06/00 11:05:032 Page 1
Job name . . . . . . . . : DSP043 User name . . . . . . : SMITH 3 Job number . . . . . . : 01329 3
Program name . . . . . . : DUMP4 Library . . . . . . . : MYLIB4 Statement . . . . . . . : 1200 5
Module name . . . . . . : DUMP Procedure name . . . : DUMP
Messages
Message 6 Message From To
Time ID Sev Type Text Program Inst Program Inst
110503 CPC2102 00 COMP Library LARRY created. QLICRLIB *N DUMP *N
110503 CPF2110 40 ESC Library MOE not found. QLICLLIB *N DUMP *N
Variables 7
Variable Type Length Value Value in Hexadecimal
*...+....1....+....2....+ * . . . + . . . . 1 . . . . + . . . . 2 . . . . +
&ABC *CHAR 10 'ONE ' D6D5C540404040404040
&XYZ *CHAR 10 'TWO ' E3E6D640404040404040
* * * * * E N D O F D U M P * * * * *
- 1
- The program number, release, modification level and date of i5/OS™.
- 2
- The date and time the dump was printed.
- 3
- The fully qualified name of the job in which the procedure was running.
- 4
- The name and library of the program.
- 5
- The number of the statement running when the dump was taken. If the command
is a nested command, the statement number is that of the outer command.
- 6
- Each message on the call message queue, including the time the message
was sent, message ID, severity, type, text, sending program and instruction
number, and receiving program and instruction number.
- 7
- All variables declared in the procedure, including variable name, type,
length, value, and hexadecimal value.
If a decimal variable contains decimal
data that is not valid, the character and hexadecimal values are printed as
*CHAR variables.
If the value for the variable cannot be located, *NOT
ADDRESSABLE is printed. This can occur if the CL procedure is used in a command
processing program for a command that has a parameter with either TYPE(*NULL)
or PASSVAL(*NULL) specified, or if RTNVAL(*YES) was specified for the parameter
and a return variable is not coded on the command.
If a variable is
declared as TYPE(*LGL), it is shown on the dump as *CHAR with a length of
1.