| Use
the EXIT directive in a subprogram to
terminate the subprogram and return control to the
initiating program. You
can have the subprogram return an error code value to the
calling program by using EXITERR or by specifying the
error value following the EXIT
directive. Use an integer from 0 to 32767 for the error
value. To have the calling program process an error value
other than zero, use the ERR= option in
the CALL directive (or use SETERR
numeric expression). A value is 0
(zero), which generally indicates record busy and force
an autormatic retry will not when generated by an EXIT
directive..
When you use EXIT
in a compound statement, it must be the final
directive:
9000 PRINT
"Subroutine done"; EXIT
|