from a base of 0, but not all languages can use this base. CL and R example, work from a base of 1, so you need to add 1 to the dec offset. The hold on job queue field begins at decimal offset 76, for access the information in CL or RPG, you need to address byte 77 wit receiver variable.

Using the format, you can tell that

the

field

after

the

hold

on

job

queue name,

begins in

offset

86.

This

means

that

the

hold

on

job

queu

tion

is

in the following

location

from

a

CL

or

RPG

perspective:

 

 

 

 

 

 

77

86

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

XXXXXXXXXX

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The

only

possible values

for

the

hold

on

job

queue

field

are

*YES

and

are left-justified in

the field and the remaining positions are blank.

Most

of

the

formats

provide

additional

bytes for each field to

allow

such as a new value

for the hold

on

job queue

field

that

would

be

bytes.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Many of the needed structures are provided by the system-include lib QSYSINC. However, any fields of a structure that are variable in length defined by QSYSINC. These variable-length fields must be defined by th shown by.7/ on page 3-20. For more information on the QSYSINC library, see “APIs and the QSYSINC Library” on page 2-28.

Retrieving

the

Hold Parameter

(Exception

Message)—OPM

RPG

 

 

Example

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In

the

following

program example,

all the pieces have been put

togethe

 

 

 

RPG program that accesses the hold on job queue information from a jo

 

 

 

description. A

message is sent for the value found. To make the

RPG

pr

 

 

 

more

general

 

purpose, two parameters for the job description (JOBD) n

 

 

 

library (JOBDL) name are passed.8/ (referto it to page 3-7). The program

 

 

 

 

 

example, which is named JOBDAPI

(this program name is also used

in

ot

 

 

 

ples

in

this

chapter), does not handle errors. Any errors that are re

 

 

 

returned

as

 

exception

messages.

 

 

 

 

 

 

I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

 

 

 

 

I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

 

 

 

 

I\

 

 

 

 

 

 

 

 

 

 

 

I\Program Name: JOBDAPI

 

 

 

 

 

 

 

I\

 

 

 

 

 

 

 

 

 

 

 

I\Language:

OPM RPG

 

 

 

 

 

 

 

 

I\

 

 

 

 

 

 

 

 

 

 

 

I\Descriptive Name:

Job Description

 

 

 

 

 

 

I\

 

 

 

 

 

 

 

 

 

 

 

I\Description:

This example expects errors to be sent as escape

 

 

 

 

 

I\

 

 

messages.

 

 

 

 

 

 

 

I\

 

 

 

 

 

 

 

 

 

 

 

I\Header Files Included: QUSEC - Error Code Parameter

 

 

 

 

 

I\

 

 

 

QWDRJOBD - Retrieve Job Description API

 

 

 

 

 

I\

 

 

 

 

 

 

 

 

 

 

 

I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

 

 

 

 

I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

 

 

 

 

I\

 

 

 

 

 

 

 

 

 

 

 

I\ Error Code Parameter Include for the APIs

 

 

 

 

 

 

I\

 

 

 

 

 

 

 

 

 

 

 

I/COPY QSYSINC/QRPGSRC,QUSEC

 

 

 

 

3-6

System

API

Programming

V4R1

 

 

 

 

 

 

 

Page 58
Image 58
IBM Version 4 manual Example, Hold Parameter, Perspective, Only Possible values For Hold Job Queue Field Are