IBM Version 4 Universal Remote User Manual


 
I
Iᑍ Retrieve Job Description API Include
I
I/COPY QSYSINC/QRPGSRC,QWDRJOBD2
I
Iᑍ Command String Data Structure
I
ICMDSTR DS
I I 'SNDMSG MSG(''HOLD - 1 26 CMD1
I 'value is '
I 27 36 HOLD
I I ''') TOUSR(QPGMR)' 37 51 CMD2
I
Iᑍ Miscellaneous Data Structure
I
I DS
I 3 4
I I 39 B 1 4RCVLEN
I I 'JOBD1' 5 12 FORMAT
I 5
C
Cᑍ Beginning of Mainline
C
Cᑍ Two parameters are being passed into this program.
C
C ᑍENTRY PLIST 8
C PARM JOBD 1
C PARM JOBDL 1
C
Cᑍ Move the two parameters passed into LFNAM.
C
C JOBD CAT JOBDL LFNAM 2 9
Cᑍ Error code bytes provided is set to 
C
C Z-ADD QUSBNB 6
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
C MOVELQWDBHN HOLD
C
Cᑍ Let's tell everyone what the hold value was for this jobd.
C
C Z-ADD51 LENSTR 155
C CALL 'QCMDEXC'
C PARM CMDSTR
C PARM LENSTR
C
C SETON LR
C RETRN
C
Cᑍ End of MAINLINE
C
The program declares the variables to be used. The QWDBH variable is length
390 as shown by 3 on page 3-7.
In the example, the program places a value of JOBD0100 in the format variable. A
literal could have been used instead for those languages that support a literal on a
call 5. (For program examples in other languages, see “Original Program Model
(OPM) APIs—Examples” on page B-2.) The program generates the qualified name
of the job description (JOBD) by concatenating the simple name and the library
Chapter 3. Common Information across APIs—Basic (OPM) Example 3-7