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—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