C PARM CONTHD
C PARM RCV
C PARM RCVSZ
C PARM 'EXTI2'FORMAT 8
C PARM EPNTNM
C PARM 'EXMP1'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 successful,
Cᑍ check to see if there are any exit programs to call.
Cᑍ
Cᑍ The receiver variable offers enough room for a minimum of one
Cᑍ exit program entry because the receiver variable was declared
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 entry,
Cᑍ the bytes available field would need to be checked as well as
Cᑍ the number of exit programs returned field. If the number of
Cᑍ exit programs returned field is set to zero and the bytes
Cᑍ available field is greater than the bytes returned field, 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 call
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-74 System API Programming V4R1