It is important to access the count and to compare for the e libraries to be processed. If you do not check for the exa
Chapter 3. Common Information across APIs—Basic (OPM) 3-Example23

I\

IDS

I I

1ððð

 

 

B

1

4ðRCVLEN

 

I I

ð

 

 

B

5

8ðX

 

I I

'JOBDð1ðð'

 

 

9

16 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\

 

 

 

 

 

 

 

 

C\

Error code Parameter is set to 1ðð

 

 

 

 

C\

 

 

 

 

 

 

 

 

C

 

 

Z-ADD1ðð

QUSBNB

 

 

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'

 

 

 

 

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\

See if any errors were returned in the error code parame￿ter.

C

 

 

EXSR ERRCOD

 

 

 

 

C\

 

 

 

 

 

 

 

 

C

Nð1

 

Z-ADD47

LENSTR 155

 

C\

 

 

 

 

 

 

 

 

C

Nð1

QWDBH8

ADD

1

X

 

 

 

C

Nð1

1

DO

QWDBH9

 

 

 

 

C

 

SUBSTQWDBH:X

LIB

 

 

 

C\

 

 

 

 

 

 

 

 

C\

Let's tell everyone what the library value is.

 

C\

 

 

 

 

 

 

 

 

C

 

 

CALL 'QCMDEXC'

 

 

 

 

C

 

 

PARM

 

CMDSTR

 

 

C

 

 

PARM

 

LENSTR

 

 

C

 

 

ADD

11

X

 

 

 

C

 

X

IFGE RCVLEN

 

 

 

 

C

 

 

LEAVE

 

 

 

 

 

C

 

 

ENDIF

 

 

 

 

 

C

 

 

ENDDO

 

 

 

 

 

C\

 

 

 

 

 

 

 

 

C

 

 

SETON

 

 

 

LR

 

C

 

 

RETRN

 

 

 

 

 

C\

 

 

 

 

 

 

 

 

C\

End of MAINLINE

 

 

 

 

 

 

C\

 

 

 

 

 

 

 

 

C\

 

 

 

 

 

 

 

 

C\

Subroutine to handle errors returned in the error code

C\

parameter.

 

 

 

 

 

 

C\

 

 

 

 

 

 

 

 

C

 

ERRCOD

BEGSR

 

 

 

 

 

C

 

QUSBNC

IFGT ð

 

 

 

 

C

 

 

SETON

 

 

 

ð1

Error on API Call

C\

 

 

 

 

 

 

 

 

C\

Process errors returned from the API.

 

 

 

C\

 

 

 

 

 

 

 

 

C

 

 

END

 

 

 

 

 

C

 

 

ENDSR

 

 

 

 

 

Note:

Page 75
Image 75
IBM Version 4 manual Entry