Use of STAE or ESTAE and SPIE in IMS batch programs
IMS uses STAE or ESTAE routines in the IMS batch regions to ensure that database logging and various resource cleanup functions are completed.
Two important aspects of the STAE or ESTAE facility are that:
- IMS relies on its STAE or ESTAE facility to ensure database integrity and resource control.
- The STAE or ESTAE facility is also available to the application program.
Because of these two factors, be sure you clearly understand the relationship between the program and the STAE or ESTAE facility.
Generally, do not use the STAE or ESTAE facility in your batch application program. However, if you believe that the STAE or ESTAE facility is required, you must observe the following basic rules:
- When the environment supports STAE or ESTAE processing, the application program STAE or ESTAE
routines always get control before the IMS STAE or ESTAE
routines. Therefore, you must ensure that the IMS STAE or ESTAE
exit routines receive control by observing the following procedures in your application program:
- Establish the STAE or ESTAE routine only once and always before the first DL/I call.
- When using the STAE or ESTAE facility, the application program must not alter the IMS abend code.
- Do not use the RETRY option when exiting from the STAE or ESTAE routine. Instead, return a CONTINUE-WITH-TERMINATION indicator at the end of the STAE or ESTAE processing. If your application program does specify the RETRY option, be aware that IMS STAE or ESTAE exit routines will not get control to perform cleanup. Therefore, system and database integrity may be compromised.
- The application program STAE/ESTAE exit routine must not issue DL/I calls because the original abend may have been caused by a problem between the application and IMS. This would result in recursive entry to STAE/ESTAE with potential loss of database integrity or in problems taking a checkpoint.