C\ exceptions sent back through the error code parameter, it sets
C\ the bytes provided field to the number of bytes it gives the
C\ API for the parameter.
C\
C EVAL QUSBPRV = %SIZE(QUSEC)
C\
C\ Call the API to remove the exit program.
C\
C CALLB QUSREPGM
C PARM EPNTNAME
C PARM 'EXMPð1ðð' FORMAT 8
C PARM 1 PGM_NBR
C PARM QUSEC
C\
C\ If an exception occurs, the API returns the exception in the
C\ error code parameter. The bytes available field is set to
C\ zero if no exception occurs and greater than zero if an
C\ exception does occur.
C\
C IF QUSBAVL > ð
C OPEN QPRINT
C EXCEPT ERRAEPGM
C EXSR DONE
C ENDIF
C\
C\ If the call to remove the exit program is successful,
C\ deregister the exit point.
C\
C\ Call the API to deregister the exit point.
C\
C CALLB QUSDEP
C PARM EPNTNAME
C PARM 'EXMPð1ðð' FORMAT
C PARM QUSEC
C\
C\ If an exception occurs, the API returns the exception in the
C\ error code parameter. The bytes available field is set to
C\ zero if no exception occurs and greater than zero if an
C\ exception does occur.
C\
C IF QUSBAVL > ð
C OPEN QPRINT
C EXCEPT ERRAEPNT
C EXSR DONE
C ENDIF
C EXSR DONE
C\
C\ End of MAINLINE
C\
C\
C\ Return to programs caller
C DONE BEGSR
C EVAL \INLR = '1'
C RETURN
C ENDSR
O\
OQPRINT E ERRAEPNT 1 6
O 'Attempt to deregister -
Appendix B. Original Examples in Additional Languages B-93