Requesting a dump

Your recovery routine can also request a dump of storage to help determine the cause of the error. In most cases, the system does not automatically request dumps on behalf of your program. To request an ABEND dump, the recovery routine can issue the SETRP macro with the DUMP=YES parameter. To request an SVC dump, the recovery routine can issue the SDUMPX (or SDUMP) macro.

“Dumping Virtual Storage (ABEND, SNAPX, and SNAP Macros” in z/OS MVS Programming: Assembler Services Guide contains information about ABEND dumps. Dumping virtual storage (SDUMPX, SDUMP, and IEATDUMP macros) and Processing program interruptions (SPIE, ESPIE) contain information about SVC dumps.

Before requesting a dump of storage, the recovery routine should check the SDWAEAS bit. The SDWAEAS bit is on when a previous recovery routine has provided sufficient diagnostic data related to this error. The recovery routine that analyzes the problem and captures sufficient diagnostic data is responsible for setting the SDWAEAS bit so that subsequent recovery routines know they do not have to capture any further data. If the recovery routine issues SDUMPX (or SDUMP), the system sets the SDWAEAS bit automatically.

Note that if your program calls a system service (by issuing a macro or callable service), that system service might encounter a user-induced error and end abnormally. Generally, the system does not take dumps for user-induced errors. If you require such a dump, then it is your responsibility to request one in your recovery routine.