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
Cᑍ
C Z-ADD QUSBPRV 11
Cᑍ
Cᑍ Call the API.
Cᑍ
C CALL QWDRJOBD 1 1
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 ᑍIN1 = ᑍON
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
Cᑍ
C EVAL ᑍINLR = '1'
C RETURN
Cᑍ
Cᑍ End of MAINLINE
Cᑍ
Cᑍ Subroutine to handle errors received on the CALL
Cᑍ
C ERROR BEGSR
C IF MSG_ID = 'CPF981'
Cᑍ
Cᑍ Process errors returned from the API
Cᑍ
C CALL 'QCMDEXC'
C PARM NO_JOBD
C PARM NO_JOBD_SZ
C END
C ENDSR
Appendix B. Original Examples in Additional Languages B-9