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 'EXMP1' 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 'EXMP1' 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