Obtain an ABEND dump by taking the following steps for each job
step where you want to code a dump:
- Code a DD statement in the JCL for every job step where a dump
would be needed. The statement can specify one of the following:
- Direct access
- SYSOUT
- Tape
- Printer (Not recommended; printer cannot be used for anything
else for duration of job step.)
The
presence of the DCB attributes enables the system-determined block
size process to select an efficient block size for the DASD selected.
For more information, see z/OS DFSMS Using Data Sets.
Your installation can make specification of these attributes unnecessary
through local SMS class selection routines.
For example, the
following SYSOUT SYSABEND DD statement places the dump in sysout output
class A. In the example, output class A is a print class. The system
prints a dump written to this class when printing the class.
//SYSABEND DD SYSOUT=A
The
following example places a SYSUDUMP dump on a scratch tape. In the
example, TAPE is an installation group name. DEFER specifies that
the operator is to mount the tape only when the data set is opened;
thus, the operator will not mount the tape unless it is needed for
a dump. The system deletes the data set if the job step ends normally;
in this case, the data set is not needed because no dump was written.
The system keeps the data set if the step ends abnormally; the data
set contains a dump. A future job step or job can print the dump.
//SYSUDUMP DD DSN=DUMPDS,UNIT=(TAPE,,DEFER),DISP=(,DELETE,KEEP)
- Place the DD statement in the JCL for the job step that runs the
program to be dumped or in the logon procedure for a TSO/E user ID.
The
following example shows a SYSABEND DD statement in the logon procedure
for a TSO/E user ID. A dump statement must appear in the logon procedure
in order to process a dump in the foreground. The system keeps the
data set if the job step ends abnormally.
//SYSABEND DD DSN=MYID3.DUMPS,DISP=(OLD,,KEEP)
- If you need to diagnose a program that does not contain code for
an ABEND dump, code one of the following:
- ABEND assembler macro with a DUMP parameter in a problem program
or an authorized program
The following example shows
an ABEND macro that ends a program with a user completion code of
1024 and requests a dump:
ABEND 1024,DUMP
- SETRP assembler macro with a DUMP=YES parameter in the recovery
routine for a problem program or an authorized program
The
following example shows a SETRP macro in an ESTAE recovery routine
for a problem program. The address of the system diagnostic work area
(SDWA) is in register 1, which is the default location.
SETRP DUMP=YES
- CALLRTM assembler macro with a DUMP=YES parameter in an authorized
program
The
following example shows a macro in an authorized program. The CALLRTM
macro ends a program and requests a dump. Register 5 contains the
address of the task control block (TCB) for the program.
CALLRTM TYPE=ABTERM,TCB=(5),DUMP=YES
- If you need to diagnose a program that already contains code for
an ABEND dump, and that program is already abending, skip step 5.
- If you need to diagnose a program that already contains code for
an ABEND dump, but the program is not currently abending, ask the
operator to enter a CANCEL command with a DUMP parameter on the console
with master authority.
For example, to cancel a job and request
a dump, ask the operator to use either of the following:
CANCEL BADJOB,DUMP
CANCEL STARTING,A=1234,DUMP
To
cancel a user ID and request a dump, ask the operator to use either
of the following commands:
CANCEL U=MYID3,DUMP
CANCEL U=*LOGON*,A=5678,DUMP
- The system writes a formatted dump to the data set defined in
step 1.