IBM Version 4 Universal Remote User Manual


 
I
I DS
I I 1 B 1 4RCVLEN
II B 5 8X
I I 'JOBD1' 9 16 FORMAT
C
Cᑍ Beginning of Mainline
C
Cᑍ Two parameters are being passed into this program.
C
C ᑍENTRY PLIST
C PARM JOBD 1
C PARM JOBDL 1
C
Cᑍ Move the two parameters passed into LFNAM.
C
C JOBD CAT JOBDL LFNAM 2
C
Cᑍ Error code Parameter is set to 1
C
C Z-ADD1 QUSBNB
C
Cᑍ Instead of specifying 'QWCRJOBD', I could have used the
Cᑍ constant QWDBGB that was defined in the QWDRJOBD include.
C
C CALL 'QWDRJOBD'
C PARM QWDBH Receiver Var.
C PARM RCVLEN Length RCVVAR
C PARM FORMAT Format Name
C PARM LFNAM Qual. Job Desc
C PARM QUSBN Error Code
Cᑍ See if any errors were returned in the error code parameter.
C EXSR ERRCOD
C
C N1 Z-ADD47 LENSTR 155
C
C N1 QWDBH8 ADD 1 X
C N1 1 DO QWDBH9
C 1 SUBSTQWDBH:X LIB
C
Cᑍ Let's tell everyone what the library value is.
C
C CALL 'QCMDEXC'
C PARM CMDSTR
C PARM LENSTR
C ADD 11 X
C X IFGE RCVLEN
C LEAVE
C ENDIF
C ENDDO
C
C SETON LR
C RETRN
C
Cᑍ End of MAINLINE
C
C
Cᑍ Subroutine to handle errors returned in the error code
Cᑍ parameter.
C
C ERRCOD BEGSR
C QUSBNC IFGT 
C SETON 1 Error on API Call
C
Cᑍ Process errors returned from the API.
C
C END
C ENDSR
Note: It is important to access the count and to compare for the exact number of
libraries to be processed. If you do not check for the exact number of
Chapter 3. Common Information across APIs—Basic (OPM) Example 3-23