ERROR Dump Statements


An error dump describes the system state that can be written to a file when a program or job abnormally terminates due to an error or failure. Error dumps can be created automatically by the system when an error occurs or generated manually by coding the appropriate JCL statements.

It contains information such as the memory contents, register values, program counters at the time of the error, and other system information that may be relevant to identifying the cause of the failure.

The error dump can be used for debugging and troubleshooting. System administrators can use error dumps to identify and correct these issues, helping to ensure the stability and reliability of the system as a whole.

Those JCL statements are -

  • SYSABEND
  • SYSMDUMP
  • SYSUDUMP

SYSABEND Statement

SYSABEND DD statement used to specify the system dump dataset in the JCL. When a program or job step terminates abnormally, the system writes a dump of the program storage to a dataset code with SYSABEND.

Syntax -

//SYSABEND DD DSN=dataset-name,..
//SYSABEND DD SYSOUT=*
Example - Writing dump to spool.
//TESTJOB JOB ...
//STEP1 EXEC PGM=PROG1
//SYSABEND DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
...

SYSMDUMP Statement

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

Syntax -

//SYSMDUMP DD DSN=dataset-name,..
//SYSMDUMP DD SYSOUT=*
Example - Writing dump to spool.
//TESTJOB JOB ...
//STEP1    EXEC PGM=PROG1
//SYSMDUMP DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSIN DD *
...

SYSUDUMP Statement

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

Syntax -

//SYSUDUMP DD DSN=dataset-name,..
//SYSUDUMP DD SYSOUT=*
Example - Writing dump to spool.
//TESTJOB JOB ...
//STEP1    EXEC PGM=PROG1
//SYSUDUMP DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSIN DD *
...