D 15 INZ(''') TOUSR(QPGMR)')
DCMD_STR2 DS
D 43 INZ('SNDMSG MSG(''Program failed -
D with message ID ')
D MSG_ID 7
D 15 INZ(''') TOUSR(QPGMR)')
Dᑍ
Dᑍ Miscellaneous data structure
Dᑍ
DRCVLEN S 9B INZ(%SIZE(QWDD1))
DFORMAT S 8 INZ('JOBD1')
DLENSTR S 15 5 INZ(%SIZE(CMD_STRING))
DLENSTR2 S 15 5 INZ(%SIZE(CMD_STR2))
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 JOBD_LIB 1
Cᑍ
Cᑍ Move the two parameters passed into LFNAM
Cᑍ
C JOBD CAT JOBD_LIB LFNAM 2
Cᑍ
Cᑍ Error Code Bytes Provided is set to 16
Cᑍ
C EVAL QUSBPRV = %SIZE(QUSEC) 15
Cᑍ
Cᑍ Call the API.
Cᑍ
C CALL QWDRJOBD
C PARM QWDD1
C PARM RCVLEN
C PARM FORMAT
C PARM LFNAM
C PARM QUSEC
Cᑍ
Cᑍ Test for an error on the API call
Cᑍ
C IF QUSBAVL > 13
Cᑍ
Cᑍ If there was an error, exit to ERROR subroutine
Cᑍ
C EXSR ERROR
Cᑍ
Cᑍ Else, process the HOLD value
Cᑍ
C ELSE
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 END
Appendix B. Original Examples in Additional Languages B-15