ON FAILURE
For each phase, you can specify a particular return code to use when a failure occurs in that phase. Alternatively, you can specify ALL to indicate what return code to use when a failure occurs in any of the execution phases. For example, the following specification indicates that a failure in any phase should terminate with return code 12:
ON FAILURE ALL TERMINATE UTILITY RETCODE 12
The default for this option is ON FAILURE ALL TERMINATE UTILITY. In this case, if UNLOAD PLUS encounters a failure in any phase, the job terminates with the highest assigned return code.
Important
In version 10.1 and earlier, the default behavior was to stop the utility instead of terminating.
TERMINATE UTILITY
When TERMINATE UTILITY is in effect for an abend that occurs during any or all of the UTILINIT, UNLOAD, or UTILTERM phases, UNLOAD PLUS completes the following tasks:
Deletes the row that contains the utility ID from the BMCUTIL and BMCSYNC tables
Issues either the normal return code or the one that you specify with the RETCODE option
With the following exceptions, deletes the SYSREC, SYSRED, SORTWK, and referenced files if you have specified DELETEFILES YES:
If DIRECT NO is in effect, UNLOAD PLUS does not delete any referenced files.
UNLOAD PLUS does not delete any HFS referenced files.
If you are running the unload job in a worklist environment, UNLOAD PLUS deletes only the dynamically allocated SYSREC, SYSRED, and referenced file data sets.
Multiple statements
When you specify multiple ON FAILURE statements, UNLOAD PLUS functions as follows:
For competing ON FAILURE statements, UNLOAD PLUS honors the last statement.
When a phase-specific ON FAILURE statement follows an ON FAILURE ALL statement, UNLOAD PLUS honors the phase-specific statement for that phase and the ON FAILURE ALL statement for remaining phases.
In the following example, a failure in any phase results in return code 20, overriding the first statement:
ON FAILURE UNLOAD TERMINATE UTILITY RETCODE 25
ON FAILURE ALL TERMINATE UTILITY RETCODE 20
If you reverse these statements (next example), a failure in the UNLOAD phase results in return code 25, and a failure in the UTILINIT or UTILTERM phase results in return code 20:
ON FAILURE ALL TERMINATE UTILITY RETCODE 20
ON FAILURE UNLOAD TERMINATE UTILITY RETCODE 25
RETCODE | This option allows you to specify which return code UNLOAD PLUS should issue when an abnormal termination occurs during the phase that you specified with TERMINATE UTILITY. Valid values are 0 through 4095. Additional considerations The following considerations apply to this option:
|
---|
Important
SmartSwitch converts all ON FAILURE TERMINATE UTILITY RETCODE integer statements into one ON FAILURE ALL TERMINATE UTILITY RETCODE integer statement and sends it to NGT Unload. SmartSwitch also converts the value to +CLEANUP(YES,returnCode) for use in NGTSSJCL/NGTSSSYN. For more information, see SmartSwitch considerations for ON FAILURE.
STOP UTILITY
In versions 10.2 and later, UNLOAD PLUS no longer honors this syntax. If you specify STOP UTILITY, UNLOAD PLUS changes the syntax to TERMINATE UTILITY and issues message BMC51704I.
In versions 10.1 and earlier, if you specified STOP UTILITY for an abend that occurred during the UTILINIT, UNLOAD, or UTILTERM phase, UNLOAD PLUS stopped the job and left the utility ID in the BMCUTIL and BMCSYNC tables.
Comments
Log in or register to comment.