C\

C\ Initialize the error code to inform the API that all

C\ exceptions should be returned through the error code pa￿rameter.

C\

 

 

 

 

C

EVAL

QUSBPRV = %SIZE(QUSEC)

 

C\

 

 

 

 

C\ Blank out the continuation

handle to let the API know th￿at 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

'EXTIð1ðð'

FORMAT

8

C

PARM

 

EPNTNAME

 

C

PARM

'EXMPð1ðð'

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 succes￿sful, 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 variab￿le 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 BLanguages-83

Page 361
Image 361
IBM Version 4 manual Move \BLANKS Continhdl, Callb Qusrei Parm Continhdl Rcvvar Rcvvarsz, Format Parm Epntname