I I

'SNDMSG MSG(''No such-

1 35 MSG3A

I' \JOBD exists'') '

I I'TOUSR(QPGMR)'36 47 MSG3B

I\

I\ Miscellaneous Data Structure

I\

IDS

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 LFNAM.

C\

 

 

 

 

 

 

C

 

JOBD

CAT JOBDL

LFNAM

C\

Error code bytes provided is set to ð

 

 

C\

 

 

 

 

 

 

C

 

 

Z-ADDð

QUSBNB .11/

C\

 

 

 

 

 

 

C\

Instead of specifying 'QWCRJOBD',

I could have used the

C\

constant QWDBGB that was defined in the QWDRJOBD includ￿e.

C\

 

 

 

 

 

 

C

 

 

CALL 'QWDRJOBD'

 

 

ð1 .1ð/

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

ð1

 

EXSR ERROR

 

 

Error Subroutine

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\

Subroutine to handle errors received on the CALL

C\

 

 

 

 

 

 

C

 

ERROR

BEGSR

 

 

 

C

 

MSGIDD

IFEQ 'CPF98ð1'

 

 

 

C\

 

 

 

 

 

 

C\

Process errors returned from the API.

 

 

C\

 

 

 

 

 

 

C

 

 

Z-ADD47

LENSTR 155

C

 

 

CALL 'QCMDEXC'

 

 

 

C

 

 

PARM

MSG3

 

 

C

 

 

PARM

LENSTR

 

C

 

 

END

 

 

 

C

 

 

ENDSR

 

 

 

If the CPF9801 exception occurs, your program sends a message to the message queue as shown in the following display:

3-10System API Programming V4R1

Page 62
Image 62
IBM Version 4 manual ITOUSRQPGMR36 47 MSG3B