SYSMDUMP
SYSMDUMP
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 -
Scenario - Writing dump to spool.
//TESTJOB JOB ...
//STEP1 EXEC PGM=PROG1
//SYSMDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
...