XSUTTERM (post-utility termination) automation control point
Variable name | Contents | Possible values | Notes |
|---|---|---|---|
exit_rc | Default return code for this automation control point | See Return codes | |
jobname | Name of the current job | Not applicable | |
jobtype | Type of job that is running |
| |
objreport. | Stem variable containing output lines from the object report | Not applicable | |
plan | Db2 plan used to connect to Db2 | Not applicable | |
rc | Return code with which to override the exit_rc value | See Return codes | This return code determines the job step condition code. If you do not want to change this, specify rc=exit_rc. Otherwise, set this variable to the desired value. Also see Usage considerations. |
read_syserror | Not applicable | ||
restart | Value of the third parameter on the EXEC statement |
| |
restart_parm | Value of the third parameter on the EXEC statement |
| |
runstats. | Stem variable containing output lines from the RUNSTATS report | Not applicable | |
ssid | Db2 subsystem ID | Not applicable | |
stepname | Name of the current job step | Not applicable | |
step_rc | Return code to use for the job step | See Return codes | |
summary. | Stem variable containing output lines from the SUMMARY DD You can parse this stem variable to search for specific error messages such as exclusion messages for RTS. | Not applicable | |
syserror. | Stem variable containing output lines from the SYSERROR DD You can parse this stem variable to search for specific error messages. | Not applicable | See Usage considerations. |
uid | Utility ID | Not applicable |
Return codes
The XSUTTERM automation control point returns the following return codes:
Return code | Description |
|---|---|
0 | Continue the run as normal |
Any other value | Abnormal termination |
Usage considerations
Review the following information before using this automation control point:
Information about the return code is reported in the following locations:
- Message NGTR303 in CDBPRINT
- JCL output message IEF142I (JES2)
If you change the return code by setting variable rc in XSUTTERM, message NGTR303 will not report the changed return code but IEF142I will. In CDBPRINT, message NGTU098 displays, confirming the return code change.
- When the return code is 8 or greater, the utility is restartable. To end the job with a return code 8 but clean up the utility ID so that it is not restartable:
- Perform one of the following actions:
- In UTLPARM CLEANUP, specify YES.
- In XSVRXERR-server-processing-error-automation-control-point, specify ACTION=CLEANUP.
- Set STEP_RC=8.
- Perform one of the following actions:
- For information about stem variables (such as the summary variable) see the IBM REXX documentation.
- Both the primary and any server jobs invoke the XSUTTERM automation control point. When calling XSUTTERM in the server, you can use it for any processing needed (such as reporting), but do not use it to set global variables used by the primary. By the time a server begins termination processing, the primary job itself might also be terminating. In other words, the primary's XSUTTERM might be called before the server XSUTTERM, thus cancelling access to any global variables that the server sets.
- The primary's syserror variable contains all error messages written in all of the servers' jobs. Because the error messages are saved across restarts, the stem variable will contain all error messages for all runs of the utility ID.