IBM Version 4 manual Appendix B. Original Examples in Additional BLanguages-69

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 347
Image 347

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 PROCEDURE "QusRetrieveExitInformation" 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.

Appendix B. Original Examples in Additional BLanguages-69

Page 347
Image 347
IBM Version 4 manual Appendix B. Original Examples in Additional BLanguages-69