IBM Version 4 manual Parm RCV Rcvsz, ADD Quscjf Substrcvy, Quscjg, Movelquschl, Callpg CAT

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 352
Image 352

C

PARM

CONTHD

 

C

PARM

RCV

 

C

PARM

RCVSZ

 

C

PARM 'EXTIð2ðð'FORMAT

8

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

 

EXCPTERRPGM

C

 

EXSR DONE

C

 

ENDIF

C\

 

 

C\ If the call to retrieve exit program information is succ￿essful,

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

C\

C\ The receiver variable offers enough room for a minimum o￿f one

C\ exit program entry because the receiver variable was de￿clared

C\ as 35ðð bytes. Therefore, this example only checks the

C\ number of exit programs returned field. If the receiver

C\ variable were not large enough to hold at least one entr￿y,

C\ the bytes available field would need to be checked as we￿ll as

C\ the number of exit programs returned field. If the number of

C\ exit programs returned field is set to zero and the byte￿s

C\ available field is greater than the bytes returned fiel￿d, the

C\ API had at least one exit program entry to return but was￿

C\ unable to because the receiver variable was too small.

C\

 

 

 

 

C

36

SUBSTRCV:1

QUSCJ

C

1

ADD

QUSCJF

Y

C

72

SUBSTRCV:Y

QUSCH

C

 

DO

QUSCJG

 

C\

 

 

 

 

C\ Get the exit program name and library

C\

 

 

 

 

C

 

MOVE

\BLANKS

CALLPG

C

 

MOVELQUSCHL

CALLPG

C

CALLPG

CAT

'/':ð

CALLPG

C

CALLPG

CAT

QUSCHK:ð

CALLPG

C\

 

 

 

 

C\ Call the exit program while ignoring failures on the cal￿l

C\

 

 

 

C

CALL

CALLPG

ð1

C

PARM

 

EXTPRM 1ð

C\

C\ Set Y to point to the next exit program entry

C\

 

 

 

C

1

ADD QUSCHB

Y

C

72

SUBSTRCV:Y

QUSCH

C

 

ENDDO

 

B-74System API Programming V4R1

Page 352
Image 352
IBM Version 4 Parm RCV Rcvsz, ADD Quscjf Substrcvy, Quscjg, Movelquschl, Callpg CAT, Call Callpg, ADD Quschb Substrcvy