SYSUDUMP DD Statement


SYSUDUMP produces a dump of user areas. The dump is formatted and readable. SYSUDUMP dumps are the only user ABEND dumps.

SYSUDUMP DD statement is used to direct the system to produce dump to the dataset when the job abends abnormally. If the JOB is completed successfully, the system won't generate any dump even though SYSUDUMP is coded.

Syntax1 - Writing dump into a dataset.

//SYSUDUMP DD DSN=dataset-name,DISP=SHR

Syntax2 - Writing dump to spool.

//SYSUDUMP DD SYSOUT=*
Note! Coding multiple datasets is not allowed with the SYSUDUMP DD statement.

Examples -


Scenario1 - Writing dump to spool.

//TESTJOB JOB ...
//STEP1    EXEC PGM=PROG1
//SYSUDUMP DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSIN DD *
...

Scenario2 - Writing dump into a dataset.

//TESTJOB JOB ...
//STEP1    EXEC PGM=PROG1
//SYSUDUMP DD DSN=MATEPK.SYSUDUMP.PS,
//            UNIT=3390,
//            VOLUME=SER=123456,SPACE=(CYL,(0,1)),
//            DISP=(NEW,DELETE,KEEP)
//SYSOUT   DD SYSOUT=*
//SYSIN DD *
...