What are STAE Exits?
STAE exits (system task abend exits) are user-written recovery modules supported by DC/UCF systems. STAE exits can be invoked in the event of a program interrupt or an abnormal condition encountered by the task. The user-written module can attempt to recover the task by correcting the abnormal condition. If the abnormal condition cannot be resolved, the STAE program can request abnormal termination of the task.
How STAE Exits Work
For each task level, a program can designate a STAE routine by issuing a #STAE request. A task abnormally terminates due to a processing error or an #ABEND command. When a task terminates abnormally, STAE routines for the abended program and for all higher-level programs are executed. #STAE routines can be overridden by a #RETURN statement or excluded explicitly by an #ABEND request from the program that failed.
Note: For more information about how to issue a #STAE request, see "#STAE" in Chapter 7.
STAE routines determine the cause of the abnormal condition or program interrupt by checking the abend control element (ACE). When control is transferred to the STAE routine, DC/UCF automatically sets the value in register 1 to the address of a fullword parameter list that contains the address of the ACE. When program execution is interrupted, DC/UCF saves the contents of all registers from the abended program in the ACE.
Note: #ACEDS is a DSECT provided in the DC/UCF macro library that defines the fields of the ACE. #ACEDS can be copied into the program using the @COPY IDMS #ACEDS statement.
For more information about the abend control element (ACE) DSECT, see the DSECT Reference Guide.
Programming Considerations
Programming considerations for STAE routines are as follows:
Beginning Register Values
At the start of execution of a STAE routine, the DC/UCF system sets registers 1, 13, and 15 to the following values:
|
Displacement- decimal (hex) |
Label in #ACEDS DSECT |
Contents |
Field Size |
|---|---|---|---|
|
0(0) |
ACEPSW |
PSW at the time of the interrupt |
8 bytes |
|
8(8) |
ACEGPRS |
General registers from abended program 0-15 |
64 bytes |
|
72(48) |
ACEFPRS |
Floating point registers from the abended program 0-6 |
32 bytes |
|
112(70) |
ACEFLG |
ACE flag (see table below) |
1 byte |
|
115(73) |
ACEABCOD |
Abend code set by DC/UCF |
4 bytes |
|
120(78) |
ACEPGMNM |
Name of the abended program |
4 bytes |
|
129(81) |
ACEEPSW |
PSW in EBCDIC form |
17 bytes |
|
148(94) |
ACEOFFST |
Displacement of instruction that failed in the abended program |
6 bytes |
|
160(A0) |
ACEILC |
XA program interrupt length counter |
1 byte |
|
161(A1) |
ACEINTC |
XA interruption code |
2 bytes |
|
ACEPSWDA |
Data at PSW Start 16 bytes before and after PSW |
32 bytes |
|
|
Value |
Meaning |
Comments |
|---|---|---|
|
X'80' |
Abort was in user mode |
Set by DC/UCF |
|
X'40' |
Program check |
Set by DC/UCF |
|
X'20' |
No message is wanted |
Set by STAE routine |
|
X'10' |
No SNAP is wanted |
Set by STAE routine |
|
X'08' |
Abort task immediately |
Set by #RETURN,TYPE=ABORT |
|
X'01' |
Continue processing at R14 address |
Set by #RETURN,TYPE= CONTINUE |
|
Copyright © 2014 CA.
All rights reserved.
|
|