Cᑍ
Cᑍ Initialize the error code to inform the API that all
Cᑍ exceptions should be returned through the error code parameter.
Cᑍ
C EVAL QUSBPRV = %SIZE(QUSEC)
Cᑍ
Cᑍ Blank out the continuation handle to let the API know that this
Cᑍ is a first attempt at the retrieve operation.
Cᑍ
C MOVE ᑍBLANKS CONTIN_HDL 16
Cᑍ
Cᑍ Call the API to retrieve the exit programs
Cᑍ
C CALLB QUSREI
C PARM CONTIN_HDL
C PARM RCVVAR
C PARM RCVVAR_SZ
C PARM 'EXTI1' FORMAT 8
C PARM EPNTNAME
C PARM 'EXMP1' EPNT_FMT 8
C PARM EPGM_NBR
C PARM QUSNBRSC
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ᑍ
Cᑍ If the call to retrieve exit point information is successful,
Cᑍ check to see if there are any exit programs to call.
Cᑍ
C EVAL BASSPCPTR = %ADDR(RCVVAR)
C IF QUSNBRPR >
C EVAL INFSPCPTR = %ADDR(RCVVAR(QUSOEPE+1))
C IF QUSNBREP >
Cᑍ
Cᑍ There are some exit programs to call. Blank out the continuation
Cᑍ handle to let the API know that this is a first attempt at the
Cᑍ retrieve operation.
Cᑍ
C EVAL CONTIN_HDL = ᑍBLANKS
Cᑍ
Cᑍ Call the exit programs
Cᑍ
C EXSR CUSREI
Cᑍ
Cᑍ If the continuation handle field in the receiver variable is
Cᑍ not set to blanks, the API has more information to return than
Cᑍ what could fit in the receiver variable. Call the API for
Cᑍ more exit programs to call.
Cᑍ
Appendix B. Original Examples in Additional Languages B-83