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-EXTI2-ENTRY
TO ADDRESS OF RCVVAR(OFFSET-PROGRAM-ENTRY
OF QUS-EXTI2 + 1:).
PERFORM CALL-PGMS
NUMBER-PROGRAMS-RETURNED OF QUS-EXTI2 TIMES.
ᑍ
CALL-PGMS.
ᑍ
ᑍ Call the exit program while ignoring failures on the call
ᑍ
CALL PROGRAM-NAME OF QUS-EXTI2-ENTRY USING
EXIT-PARAMETERS
ON EXCEPTION CONTINUE.
ᑍ
ᑍ Address the next exit program entry
ᑍ
SET ADDRESS OF QUS-EXTI2-ENTRY
TO ADDRESS OF RCVVAR(OFFSET-NEXT-ENTRY
OF QUS-EXTI2-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