SYSMDUMP DD Statement


SYSMDUMP produces a dump of the system areas and the program's address space. The dumps are unformatted and machine-readable and are only ABEND dumps.

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

Syntax1 - Writing dump into a dataset.

//SYSMDUMP DD DSN=dataset-name,..

Syntax2 - Writing dump to spool.

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

Examples -


Scenario1 - Writing dump to spool.

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

Scenario2 - Writing dump into a dataset.

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