SYSDEBUG: Debugging Routine for Assembler Programs

                 

Overview

DESCRIPTIVE NAME = GSF-ENV Debugging Routine

FUNCTION = This generalised ESTAE routine simplifies ABEND resolution by formatting important MVS control blocks in an easy-to-read fashion.

AUTHOR = Gilbert Saint-Flour

DEPENDENCIES = OS/390 R4, z/OS, DFSMS/MVS, STRING macro R510

AUTHORIZATION = NONE

RESTRICTIONS = NONE

MODULE TYPE = PROCEDURE, (Sub-Routine)

PROCESSOR = IBM Assembler H Version 2 or IBM High-Level Assembler/MVS

MODULE SIZE = 23K

ATTRIBUTES = REENTERABLE, RMODE ANY, AMODE 31, PROBLEM STATE, KEY 8

OPERATION

SYSDEBUG is not a system-wide debugging tool like ABEND-AID. To use it, a program must invoke it once with AMODE=31 as follows:

	LOAD  EP=SYSDEBUG
	LR    R15,R0
	BASSM R14,R15			invoke SYSDEBUG with AMODE31 

Notes:

  1. This first invocation of the SYSDEBUG routine sets up a standard recovery environment (ESTAE) to trap abends.
  2. DO NOT try to replace LOAD/BASSM with LINK in the invoking sequence.
  3. If the program already runs with AMODE=31, then BALR or BASR can be used instead of BASSM.

The SYSDEBUG debugging routine may be used from JCL, without modifying the program, as follows:

//MYSTEP  EXEC PGM=SYSDEBUG,
//            ACCT=progname,		<- program name
//            PARM=(a,b,c,d)		<- program's parm
//STEPLIB  DD DSN=CBTTAPE.FILE183.LOAD,DISP=SHR
//SYSDEBUG DD SYSOUT=*
//SYSUDUMP DD SYSOUT=* 

Output Report

The debugging report (written to DDN=SYSDEBUG) contains the following data:

  • The abend PSW and registers
  • The TCB tree and RB chains (if this is a multi-task step
  • The RB chain of the abending TCB, in greater detail
  • The JPAQ and Load-list
  • The save-area chain (forward only)
  • The TIOT (allocated DDs)
  • OPEN data sets (with current record)

A sample output report is available here.

U0322 Abend

SYSDEBUG contains a loop detection feature that causes a U0322 abend if the calling program consumes more that 5 seconds of CPU time without doing an I/O. This feature is inactivated when a //DBGNO322 DD is present in the step's JCL.