5 FORMAT-NAME PIC X(8) VALUE "EXTI1".
5 FORMAT-NAME-1 PIC X(8) VALUE "EXTI2".
5 FORMAT-NAME-2 PIC X(8) VALUE "EXMP1".
5 NBR-OF-SELECT-CRITERIA PIC S9(9) VALUE BINARY.
5 CONTINUATION-HDL PIC X(16).
5 BASE-POINTER POINTER.
5 INFO-POINTER POINTER.
5 SPACE-NAME PIC X(2) VALUE "RCVVAR QTEMP ".
5 SPACE-ATTR PIC X(1).
5 SPACE-SIZE PIC S9(9) VALUE 35 BINARY.
5 SPACE-VALUE PIC X(1) VALUE X"".
5 SPACE-AUTH PIC X(1) VALUE "ᑍUSE".
5 SPACE-TEXT PIC X(5).
5 SPACE-REPLACE PIC X(1) VALUE "ᑍNO".
5 SPACE-DOMAIN PIC X(1) VALUE "ᑍUSER".
ᑍ
LINKAGE SECTION.
ᑍ
ᑍ Variable to hold results of QUSRTVEI. The storage for this
ᑍ variable will be allocated by way of a User Space.
ᑍ
1 RCVVAR PIC X(35).
ᑍ
ᑍ Registration Facility API include. These includes will be
ᑍ mapped over the RCVVAR (User Space) previously defined.
ᑍ
COPY QUSREG OF QSYSINC-QLBLSRC.
ᑍ
ᑍ Beginning of mainline
ᑍ
PROCEDURE DIVISION.
MAIN-LINE.
ᑍ
ᑍ Retrieve the exit point information first. If the current
ᑍ number of exit programs is not zero, retrieve the exit
ᑍ programs. It is not necessary to call for the exit point
ᑍ information to determine if the exit point has any exit
ᑍ programs. It is done here for illustrative purposes only.
ᑍ You can make one call to the API for the exit program
ᑍ information and check the number of exit program entries
ᑍ returned field to see if there are any exit programs to call.
ᑍ
ᑍ Initialize the error code to inform the API that all
ᑍ exceptions should be returned through the error code parameter.
ᑍ
MOVE 16 TO BYTES-PROVIDED OF QUS-EC.
ᑍ
ᑍ Create a User Space for RCVVAR.
ᑍ
CALL "QUSCRTUS" USING SPACE-NAME, SPACE-ATTR, SPACE-SIZE,
SPACE-VALUE, SPACE-AUTH, SPACE-TEXT,
SPACE-REPLACE, QUS-EC, SPACE-DOMAIN.
ᑍ
ᑍ If an exception occurs, the API returns the exception in the
ᑍ error code parameter. The bytes available field is set to
ᑍ zero if no exception occurs and greater than zero if an
ᑍ exception does occur.
ᑍ
Appendix B. Original Examples in Additional Languages B-63