Examples of the SYSABEND, SYSMDUMP, and SYSUDUMP DD statements
//STEP2 EXEC PGM=A
//SYSUDUMP DD SYSOUT=A
The SYSUDUMP DD statement specifies that you want the dump routed to system output class A.
//SYSMDUMP DD DSNAME=DUMP,DISP=(NEW,KEEP),
// UNIT=3390,VOLUME=SER=147958
The SYSMDUMP DD statement specifies that the dump is to be stored on a tape. Because the LABEL parameter is not coded, the tape must have IBM® standard labels.
//STEP1 EXEC PGM=PROGRAM1
//SYSABEND DD DSNAME=DUMP,UNIT=3390,DISP=(,PASS,KEEP),
// VOLUME=SER=1234,SPACE=(TRK,(40,20))
//STEP2 EXEC PGM=PROGRAM2
//SYSABEND DD DSNAME=*.STEP1.SYSABEND,DISP=(OLD,DELETE,KEEP)
Both SYSABEND DD statements specify that the dump is to be stored. The space request in STEP1 is ample and will not inhibit dumping due to insufficient space. If STEP1 does not abnormally terminate but STEP2 does, the system writes the dump for STEP2 in the space allocated in STEP1. In both steps, an abnormal termination disposition of KEEP is specified so that the dump is stored if either of the steps abnormally terminates. If both of the steps successfully execute, the second DISP subparameter, DELETE, in STEP2 instructs the system to delete the data set and free the space acquired for dumping.
//STEP EXEC PGM=EXSYSM
//SYSMDUMP DD UNIT=3390,VOLUME=SER=123456,SPACE=(CYL,(0,1)),
// DISP=(NEW,DELETE,KEEP),DSNAME=MDUMP
The SYSMDUMP DD statement allocates dump data set MDUMP to a direct access device.
//JOB1 JOB
//STEP EXEC PGM=EXSYSMDP
//SYSMDUMP DD DSNAME=SYS1.SYSMDP00,DISP=SHR
//JOB2 JOB
//STEP EXEC PGM=EXSYSMDP
//SYSMDUMP DD DSNAME=SYS1.SYSMDP00,DISP=SHR
Only the SYSMDUMP dump written by the first job will be in data set SYS1.SYSMDP00. All subsequent jobs receive message IEA849I, indicating that the data set is full.