IBM Version 4 Universal Remote User Manual


 
qualifier 9. A 20-character variable must be used, and the simple name must
begin in byte 1 with the library qualifier in byte 11. Because CAT is used, a simple
concatenation of two 10-byte variables occurs so that the names are in the correct
place for the LFNAM parameter.
The QWDRJOBD API is called with the correct parameter list. The API uses the
parameter list and accesses the job description specified. The API extracts the
values from the internal object form and places them in a data structure that
matches the JOBD0100 format. The API then returns with the data structure
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 separate field
because all fields are returned that would fit within the size indicated by the length
of receiver variable (RCVLEN) parameter. You can run the program against the
QBATCH job description in library QGPL by using the following call statement:
CALL JOBDAPI PARM(QBATCH QGPL)
If QGPL is on the library list, you can run the program against the QBATCH job
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 test job
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 unmonitored
exception (CPF9801) has occurred and offers several possible replies. At this point,
you would enter C for Cancel and press the Enter key.
If you displayed the low-level messages, you would see the following: CPF9801
(Object not found), followed by the inquiry message (CPA0701), followed by your
reply.
When you specify the error code parameter as zero, you are specifying that
exceptions be sent as escape messages. You can code the RPG program so that
any errors on the call set the indicator 01 to on (1 on page 3-10). This causes a
different path to be taken in the code.
3-8 System API Programming V4R1