I\
I/COPY QSYSINC/QRPGSRC,QWDRJOBD
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\
IMSG2 DS
I I 'SNDMSG MSG(''Progr- 1 43 MSG2A
I 'am failed with mes-
I 'sage ID '
I 44 5ð MSGIDD
I I ''') TOUSR(QPGMR)' 51 65 MSG2B
I\
I\ Miscellaneous Data Structure
I\
I DS
I I 39ð B 1 4ðRCVLEN
I I 'JOBDð1ðð' 5 12 FORMAT
C\
C\ Beginning of Mainline
C\
C\ Two parameters are being passed into this program.
C\
C \ENTRY PLIST
C PARM JOBD
C PARM JOBDL
C\
C\ Move the two parameters passed into the LFNAM.
C\
C JOBD CAT JOBDL LFNAM
C\
C\ Error code parameter is set to 16
C\
C Z-ADD16 QUSBNB .15/
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\
C\
C Nð1 MOVELQWDBHN HOLD
C\
C\ Let's tell everyone what the hold value was for this job.
C\
C Nð1 Z-ADD51 LENSTR 155
C Nð1 CALL 'QCMDEXC'
C PARM CMDSTR
C PARM LENSTR
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\
Chapter 3. Common Information across APIs—Basic (OPM) Example 3-13