IBM Version 4 Universal Remote User Manual


 
5 RESERVED PIC X(1).
Varying length
1 QUS-SPLF2.
5 NUM-FIELDS-RETD PIC S9(9) BINARY.
5 KEY-INFO.
9 LEN-FIELD-INFO-RETD PIC S9(9) BINARY.
9 KEY-FIELD-FOR-FIELD-RETD PIC S9(9) BINARY.
9 TYPE-OF-DATA PIC X(1).
9 RESERV3 PIC X(3).
9 DATA-LENGTH PIC S9(9) BINARY.
9 DATA-FIELD PIC X(1).
9 RESERVED PIC X(1).
Varying length
ᑍ Beginning of mainline
PROCEDURE DIVISION.
MAIN-LINE.
ᑍ Open LISTING file
OPEN OUTPUT LISTING.
ᑍ Set Error Code structure to use exceptions
MOVE  TO BYTES-PROVIDED OF QUS-EC. 1
ᑍ Create a User Space for the List generated by QUSLSPL
CALL "QUSCRTUS" USING SPC-NAME, EXT-ATTR, SPC-SIZE, 2
SPC-INIT, SPC-AUT, SPC-TEXT,
SPC-REPLAC, QUS-EC, SPC-DOMAIN
ᑍ Call QUSLSPL to get all spooled files for ᑍCURRENT user
CALL "QUSLSPL" USING SPC-NAME, LST-FORMAT-NAME, USR-PRF, 34
OUTQ, FORMTYP, USRDTA, QUS-EC,
JOBNAM, KEYS, NUMBER-OF-KEYS. 56
ᑍ Get a resolved pointer to the User Space for performance
CALL "QUSPTRUS" USING SPC-NAME, SPCPTR, QUS-EC. 9
ᑍ If valid information was returned
SET ADDRESS OF QUS-GENERIC-HEADER-1 TO SPCPTR.
IF STRUCTURE-RELEASE-LEVEL OF QUS-GENERIC-HEADER-1 12
NOT EQUAL "1" WRITE LIST-LINE FROM HDRERR, 13
STOP RUN.
IF (INFORMATION-STATUS OF QUS-GENERIC-HEADER-1 = "C" 14
OR INFORMATION-STATUS OF QUS-GENERIC-HEADER-1 = "P")
AND NUMBER-LIST-ENTRIES OF QUS-GENERIC-HEADER-1 >  16
B-40 System API Programming V4R1