IBM Version 4 Universal Remote User Manual


 
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—ILE COBOL
Example
Refer to “Retrieve Exit Point and Exit Program Information—ILE C Example” on
page 4-13 for the original example.
IDENTIFICATION DIVISION.
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
ᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍᑍ
Program: Retrieve Exit Point and Exit Program Information
Language: ILE COBOL
ᑍ Description: This program retrieves exit point and exit
program information. After retrieving the
exit point information, the program calls each
exit program.
APIs Used: QUSCRTUS - Create User Space
B-66 System API Programming V4R1