IBM AS/400 Frozen Dessert Maker User Manual


 
Using the DUMP Operation Code
Chapter 13. Obtaining a Dump
This chapter describes how to obtain an ILE RPG formatted dump and provides a
sample formatted dump.
Obtaining an ILE RPG Formatted Dump
To obtain an ILE RPG formatted dump (printout of storage) for a procedure while it
is running, you can:
Code one or more DUMP operation codes in the calculation specifications
Respond to a run-time message with a D or F option. It is also possible to
automatically reply to make a dump available. Refer to the “System Reply List”
discussion in the
CL Programming
manual.
The formatted dump includes field contents, data structure contents, array and table
contents, the file information data structures, and the program status data structure.
The dump is written to the file called QPPGMDMP. (A system abnormal dump is
written to the file QPSRVDMP.)
If you respond to an ILE RPG run-time message with an F option, the dump also
includes the hexadecimal representation of the open data path (ODP, a data man-
agement control block).
The dump information includes the global data associated with the module.
Depending on whether the main procedure is active, the global data may not repre-
sent the values assigned during processing of the *INZSR. If a program consists of
more than one procedure, the information in the formatted dump also reflects infor-
mation about
every
procedure that is active at the time of the dump request. If a
procedure is not active, the values of variables in automatic storage will not be
valid. If a procedure has not been called yet, the static storage will not be initialized
yet. If a procedure has been called recursively, only the information for the most
recent invocation will be shown.
Note: To obtain a dump of variable data, the program object must have debug
data. That is, it must be created with any debug view except *NONE. If no
debug data is available, then the dump will still contain the PSDS and file
information.
Using the DUMP Operation Code
You can code one or more DUMP operation codes in the calculations of your
source to obtain a ILE RPG formatted dump. A new QPPGMDMP spool file is
created whenever the DUMP operation occurs.
Note the following about the DUMP operation:
The DUMP operation runs (is active) only if keyword DEBUG(*YES) is specified
on the control specification. If the keyword is not specified, or if DEBUG(*NO) is
specified, the DUMP operation is checked for errors and the statement is
printed on the listing, but the DUMP is not processed.
If the DUMP operation is conditioned, it occurs only if the condition is met.
Copyright IBM Corp. 1994, 1999 251