Causes a specified condition to be signaled.
SIGNAL condition-name;
Abbreviations:
SIGNAL ERROR; SIGNAL ENDFILE(F);
The ONCODE built-in function returns the value of the expression in the SIGNAL USERCONDITION (expression) or VAXCONDITION (expression) statement that caused the ON-unit to be invoked. For this reason, take care to choose expression values that do not conflict with any of the values used to indicate system or run-time errors or conditions.
In general, you can avoid conflicts with system and run-time-defined codes by using values greater than or equal to 100000 (one hundred thousand) for user-defined conditions. Code values between 0 and 99999 that are currently unused by the system are reserved for future expansions.
Description
The SIGNAL statement forces a specified condition to be raised. for detailed information on condition handling, see the section ON Statement.
A signal from a SIGNAL statement or from a condition raised during run-time calls the most recently established ON-unit for the specified condition.