IBM Version 4 Universal Remote User Manual


 
TO EXCEPTION-ID OF BAD-EXIT-PGM,
WRITE LIST-LINE FROM BAD-EXIT-PGM,
STOP RUN.
ᑍ If the call to retrieve exit program information is successful,
ᑍ check to see if there are any exit programs to call.
ᑍ The receiver variable offers enough room for a minimum of one
ᑍ exit program entry because the receiver variable was declared
ᑍ as 35 bytes. Therefore, this example only checks the
ᑍ number of exit programs returned field. If the receiver
ᑍ variable were not large enough to hold at least one entry,
ᑍ the bytes available field would need to be checked as well as
ᑍ the number of exit programs returned field. If the number of
ᑍ exit programs returned field is set to zero and the bytes
ᑍ available field is greater than the bytes returned field, the
ᑍ API had at least one exit program entry to return but was
ᑍ unable to because the receiver variable was too small.
SET ADDRESS OF QUS-EXTI2-ENTRY
TO ADDRESS OF RCVVAR(OFFSET-PROGRAM-ENTRY
OF QUS-EXTI2 + 1:).
PERFORM CALL-PGMS
NUMBER-PROGRAMS-RETURNED OF QUS-EXTI2 TIMES.
CALL-PGMS.
ᑍ Call the exit program while ignoring failures on the call
CALL PROGRAM-NAME OF QUS-EXTI2-ENTRY USING
EXIT-PARAMETERS
ON EXCEPTION CONTINUE.
ᑍ Address the next exit program entry
SET ADDRESS OF QUS-EXTI2-ENTRY
TO ADDRESS OF RCVVAR(OFFSET-NEXT-ENTRY
OF QUS-EXTI2-ENTRY + 1:).
Retrieve Exit Point and Exit Program Information—OPM RPG Example
Refer to “Retrieve Exit Point and Exit Program Information—ILE C Example” on
page 4-13 for the original example.
Fᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Fᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
F
Fᑍ Program: Retrieve Exit Point and Exit Program Information
F
Fᑍ Language: OPM RPG
F
Fᑍ Description: This program retrieves exit point and exit
Fᑍ program information. After retrieving the
Fᑍ exit point information, the program calls each
Fᑍ exit program.
F
Fᑍ APIs Used: QUSRTVEI - Retrieve Exit Information
F
Appendix B. Original Examples in Additional Languages B-71