Before a user task regains control after an HSMS statement has been issued, HSMS sets Information about possible responses to error situations in batch mode and in procedures:
In the event of warnings, task switch 30 is set.
Examples:
A file specified for migration is not migratable.
A file to be restored already exists.
In the event of simple errors, task switch 31 is set.
Example:
A specified file cannot be processed because of an input or output error.In the event of serious errors, spin-off is triggered.
Examples:
An invalid statement was entered.
The maximum wait time was exceeded.
The volume for processing is missing.
The position of the task switches can be inquired in the SHOW-JOB-SWITCHES command. The SKIP-COMMANDS command can be used to branch to a branch destination, dependent on one or more of the task switches.
Spin-off causes all subsequent commands to be skipped up to the next SET-JOB-STEP or EXIT-JOB, or up to the end of the procedure or ENTER file.
With asynchronous processing, error situations detected by the HSMS server task result neither in a task switch being set nor in spin-off.
Monitoring with job variables
A monitoring job variable can be specified in the START-HSMS command for the HSMS run, and this monitors the entire program run (see the “Job Variables” manual [23]).
HSMS itself does not support monitoring job variables for its calls. However, for the individual calls a job variable can be specified in which HSMS places information over the status of this call (see section "Job variable for request monitoring").