Function
Puts the object program into a failed state.
Format
FAIL text
The text may be up to 40 characters long. Excess characters will be lost.
Forbidden contexts
NO CORE IMAGE,PROGRAM
(Note that FAIL is not allowed when break-in occurs during a command
issued by an object program.)
Execution
The FAIL command generates a pseudo program event of the category FAILED. The category of this event and the text, if any, specified in the command are written to the monitoring file system as output of the OBJECT category. In addition the category of the event and the text, together with the number of the current program member, are set up as the current program event message, overwriting information stored by a previous program event.
If the program has indicated that own monitoring of illegals is required word 8 is copied to word 14, the current member number is stored in word 15 and the address of the program's own monitoring routine written to word 8 so that when the program is restarted the current member will enter the own monitoring routine as if it had gone illegal.
If FAIL is issued during break-in and the break-in occurred while the object program was running, in the normal case this run of the program will be terminated. This means that when the break-in finishes, the job will return to command level as if a program event had occurred. However, if own monitoring of illegals is required, termination of the break-in will not return the job to command level, but will enter the appropriate monitoring routine via word 8 of the program.
Example
FAIL RESERVATION VIOLATION
Error Messages
None