IF BYTES-AVAILABLE OF QUS-EC > ð

IF EXCEPTION-ID OF QUS-EC = "CPF987ð"

CONTINUE ELSE

OPEN OUTPUT LISTING,

MOVE EXCEPTION-ID OF QUS-EC TO EXCEPTION-ID OF BAD-CREATE, WRITE LIST-LINE FROM BAD-CREATE, STOP RUN.

\

\Assign BASE-POINTER to address RCVVAR

CALL "QUSPTRUS" USING SPACE-NAME, BASE-POINTER, QUS-EC.

\If an exception occurs, the API returns the exception in t￿he

\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

TO EXCEPTION-ID OF BAD-CREATE, WRITE LIST-LINE FROM BAD-CREATE, STOP RUN.

\

SET ADDRESS OF RCVVAR TO BASE-POINTER.

\

\Blank out the continuation handle to let the API know tha￿t this

\is a first attempt at the retrieve operation.

\

MOVE SPACES TO CONTINUATION-HDL.

\

\Call the API to retrieve the exit programs

CALL "QUSRTVEI" USING CONTINUATION-HDL, RCVVAR,

BY CONTENT LENGTH OF RCVVAR, FORMAT-NAME OF MISC, 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 t￿he

\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

TO EXCEPTION-ID OF BAD-EXIT-POINT, WRITE LIST-LINE FROM BAD-EXIT-POINT, STOP RUN.

\

\If the call to retrieve exit point information is success￿ful,

\check to see if there are any exit programs to call.

\

SET ADDRESS OF QUS-EXTIð1ðð TO BASE-POINTER.

B-64System API Programming V4R1

Page 342
Image 342
IBM Version 4 manual Call Qusptrus Using SPACE-NAME, BASE-POINTER, QUS-EC, Move Spaces to CONTINUATION-HDL