qualifier.9/. A 20-character variable must be used, and the simple name mu begin in byte 1 with the library qualifier in byte 11. Because CAT concatenation of two 10-byte variables occurs so that the names are i place for the LFNAM parameter.

The QWDRJOBD API is called with the correct parameter list. The API parameter list and accesses the job description specified. The API e values from the internal object form and places them in a data struct matches the JOBD0100 format. The API then returns with the data struct placed in variable QWDBH, which is located in member QWDRJOBD in the QSYSINC library.

The output is similar to the following:

 

 

 

 

 

 

 

 

 

 

 

à

 

 

Display Messages

ð

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

System:

GENSYS9ð

 

 

 

Queue . . . . . :

QPGMR

 

Program . . . . :

\DSPMSG

 

 

 

Library . . . :

QUSRSYS

 

Library . . . :

 

 

 

 

 

Severity

. . . :

ðð

 

Delivery . . . :

\HOLD

 

 

 

Type reply (if required), press Enter.

 

 

 

 

 

 

From

. . . :

SMITH

ð7/23/94

1ð:25:14

 

 

 

 

 

HOLD value is \NO

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The API does not need to be called each time that you want a sepa because all fields are returned that would fit within the size indic of receiver variable (RCVLEN) parameter. You can run the program against QBATCH job description in library QGPL by using the following call stateme

CALL JOBDAPI PARM(QBATCH QGPL)

If QGPL is on the library list, you can run the program against the description by using the following call statement:

CALL JOBDAPI PARM(QBATCH \LIBL)

You can run the program on one of your own job descriptions or on a description where you have specified HOLD(*YES).

Handling Error Conditions—OPM RPG Example

For this example, assume that the XYZ job description does not exist:

CALL JOBDAPI PARM(XYZ \LIBL)

You

probably will

receive the

inquiry message CPA0701 that states an

unm

exception

(CPF9801)

has

occurred and offers several possible replies.

At

you

would

enter

C for

Cancel

and press the Enter key.

 

If you displayed the low-level messages, you would see the following: (Object not found), followed by the inquiry message (CPA0701), followed b reply.

When you specify the error code parameter as zero, you are speci exceptions be sent as escape messages. You can code the RPG program any errors on the call set the indicator.1ð/ on page01 to3-10)on .(This causes a different path to be taken in the code.

3-8System API Programming V4R1

Page 60
Image 60
IBM Version 4 manual Handling Error Conditions-OPM RPG Example, Call Jobdapi Parmqbatch Qgpl, Call Jobdapi Parmqbatch \LIBL