C\ Move the two parameters passed into LFNAM

 

 

C\

 

 

 

 

 

C

JOBD

CAT

JOBD_LIB

LFNAM

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

 

QWDDð1ðð

 

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

\INð1 = \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 = 'CPF98ð1'

 

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 BLanguages-9

Page 287
Image 287
IBM Version 4 Jobd CAT Jobdlib Lfnam, Call Qwdrjobd, Parm Rcvlen Format Lfnam Qusec, Exsr Error, Else Movel Qwdhjq Hold