I\

 

 

I\ Retrieve Job Description API Include

 

I\

 

 

I/COPY QSYSINC/QRPGSRC,QWDRJOBD.2/

 

I\

 

 

I\ Command String Data Structure

 

I\

 

 

ICMDSTR

DS

 

I I

'SNDMSG MSG(''HOLD -

1 26 CMD1

I'value is '

I

 

 

27

36

HOLD

I

I

''') TOUSR(QPGMR)'

37

51

CMD2

I\

 

 

 

 

I\ Miscellaneous Data Structure

I\

IDS

I\

 

.3/

 

 

 

.4/

 

 

 

 

I I

 

39ð

 

 

 

B 1

4ðRCVLEN

 

 

 

I I

 

'JOBDð1ðð'

 

5

12 FORMAT

 

 

 

I\

 

.5/

 

 

 

 

 

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

C\ Beginning of Mainline

 

 

 

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

C\ Two parameters are being passed into this program.

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

C

\ENTRY

PLIST .8/

 

 

 

 

 

C

 

 

PARM

 

JOBD

 

 

 

C

 

 

PARM

 

JOBDL

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

C\ Move the two parameters passed into LFNAM.

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

C

JOBD

CAT

JOBDL

LFNAM

2ð .9/

 

 

 

C\ Error code bytes provided is set to ð

 

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

C

 

 

Z-ADDð

QUSBNB

.6/

 

 

 

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\

 

 

 

 

 

 

 

 

 

 

C

 

 

MOVELQWDBHN

HOLD

 

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

C\ Let's tell everyone what the hold value was for this jobd￿.

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

C

 

 

Z-ADD51

LENSTR 155

 

 

 

C

 

 

CALL 'QCMDEXC'

 

 

 

 

C

 

 

PARM

 

CMDSTR

 

 

 

 

C

 

 

PARM

 

LENSTR

 

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

C

 

 

SETON

 

 

LR

 

 

 

C

 

 

RETRN

 

 

 

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

C\ End of MAINLINE

 

 

 

 

 

 

 

 

C\

 

 

 

 

 

 

 

 

 

 

The

program

declares

the

variables to be used. The QWDBH variable

390

as

shown .by3/ on page 3-7.

 

 

 

 

In

the

example, the program places a value

of JOBD0100 in

the forma

literal

could

have

been

used

instead for those languages that suppo

call.5/. (For program examples in

other languages, see “Original Program

(OPM)

APIs—Examples”

on

page B-2.) The program generates

the

qualified

of

the

job

description

(JOBD) by concatenating the simple name and

 

 

 

 

 

Chapter 3. Common

Information across

APIs—Basic

(OPM) 3-Example7

Page 59
Image 59
IBM Version 4 manual APIs-Examples