C PARM EPNTNM
C PARM 'EXMPð1ðð'EPTFMT 8
C PARM EPGMNB
C PARM ð QUSCCB
C PARM QUSBN
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 QUSBNC IFGT ð
C OPEN QPRINT
C EXCPTERREPT
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 36 SUBSTRCV:1 QUSCG
C QUSCGG IFGT ð
C 1 ADD QUSCGF X
C 2ð1 SUBSTRCV:X QUSCF
C QUSCFF IFGT ð
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 MOVE \BLANKS CONTHD
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\
C QUSCGD DOWNE\BLANKS
C MOVELQUSCGD CONTHD
C EXSR CUSREI
C ENDDO
C ENDIF
C ENDIF
C EXSR DONE
C\
C\ End of MAINLINE
C\
C\ Process exit programs in receiver variable
C\
C CUSREI BEGSR
C\
C\ Call the API to retrieve the exit program information
C\
C CALL 'QUSRTVEI'
Appendix B. Original Examples in Additional Languages B-73