D\
D\ Command string data structure
D\
DCMD_STRING DS
D 26 INZ('SNDMSG MSG(''HOLD value is ')
D HOLD
D 15 INZ(''') TOUSR(QPGMR)')
D\
D\ Miscellaneous data structure
D\ .4/ .2/ .3/
DRCVLEN S 9B ð INZ(%SIZE(QWDDð1ðð))
DFORMAT S 8 INZ('JOBDð1ðð') .5/
DLENSTR S 15 5 INZ(%SIZE(CMD_STRING))
C\
C\ Beginning of mainline
C\
C\ Two parameters are being passed into this program
C\
C \ENTRY PLIST .8/
C PARM JOBD
C PARM JOBD_LIB
C\
C\ Move the two parameters passed into LFNAM
C\
C JOBD CAT JOBD_LIB LFNAM .9/
C\
C\ Error Code Bytes Provided is set to ð
C\
C Z-ADD ð QUSBPRV .6/
C\
C\ Call the API.
C\
C CALL QWDRJOBD
C PARM QWDDð1ðð
C PARM RCVLEN
C PARM FORMAT
C PARM LFNAM
C PARM QUSEC
C\
C MOVEL QWDHJQ HOLD
C\
C\ Let's tell everyone what the hold value was for this job
C\
C CALL 'QCMDEXC'
C PARM CMD_STRING
C PARM LENSTR
C\
C EVAL \INLR = '1'
C RETURN
C\
C\ End of MAINLINE
C\
Appendix B. Original Examples in Additional Languages B-7