SET ADDRESS OF QUS-EXTIð2ðð TO BASE-POINTER.
\
IF NUMBER-POINTS-RETURNED OF QUS-EXTIð1ðð > ð
SET ADDRESS OF QUS-EXTIð1ðð-ENTRY TO
ADDRESS OF RCVVAR((OFFSET-EXIT-POINT-ENTRY OF
QUS-EXTIð1ðð + 1):)
ELSE STOP RUN.
\
IF NUMBER-EXIT-PROGRAMS OF QUS-EXTIð1ðð-ENTRY > ð
\
\ There are some exit programs to call. Blank out the continuation
\ handle to let the API know that this is a first attempt at the
\ retrieve operation.
\
MOVE SPACES TO CONTINUATION-HDL,
\
\ Call the exit programs
\
PERFORM CALL-EXIT-PROGRAMS,
\
\ If the continuation handle field in the receiver variable is
\ not set to blanks, the API has more information to return than
\ what could fit in the receiver variable. Call the API for
\ more exit programs to call.
\
PERFORM UNTIL CONTINUE-HANDLE OF QUS-EXTIð2ðð = SPACES
MOVE CONTINUE-HANDLE OF QUS-EXTIð2ðð
TO CONTINUATION-HDL,
PERFORM CALL-EXIT-PROGRAMS,
END-PERFORM.
\
STOP RUN.
\
\ End of MAINLINE
\
\
\ Process exit programs in receiver variable
\
CALL-EXIT-PROGRAMS.
\
\ Call the API to retrieve the exit program information
\
CALL PROCEDURE "QusRetrieveExitInformation" USING
CONTINUATION-HDL, RCVVAR,
BY CONTENT LENGTH OF RCVVAR,
FORMAT-NAME-1,
EXIT-POINT-NAME OF MISC,
FORMAT-NAME-2, EXIT-PGM-NBR,
NBR-OF-SELECT-CRITERIA, QUS-EC.
\
\ If an exception occurs, the API returns the exception in the
\ error code parameter. The bytes available field is set to
\ zero if no exception occurs and greater than zero if an
\ exception does occur.
\
IF BYTES-AVAILABLE OF QUS-EC > ð
OPEN OUTPUT LISTING,
MOVE EXCEPTION-ID OF QUS-EC
B-70 System API Programming V4R1