Locks

are

based

on

the

objects

that

the

API

uses. The

type of

lo

such

as

 

whether

the

object

can

 

be

used

by

more

than

one

user

a

is

based

on

what

actions

the

API

performs

on

the

object.

 

 

 

For

 

the

QWDRJOBD

API, you must have *USE authority

to

both

the

job

object

and

the

library to access the object. This

is

 

the

same

ty

is

required

for

most

situations

where

you

want

to

display

or

retrie

an

object. For example,

it

is

the

same authority that

you

would

nee

Display Job Description (DSPJOBD) command. Because no specific informa described for locks, you can assume that nothing unusual is required.

Required

Parameter

Group

 

 

 

 

 

 

 

 

 

 

 

The

Required

Parameter

Group

topic

of an API lists all the paramete

that

API. You

must use

all

of

the

parameters in

the

order that

the

None

of the parameters may be left out.

 

 

 

 

 

The

details of each parameter that

must

be used on the call to

t

API

are described in “Required Parameter

Group”

on

page 3-30.

 

Receiver

Variable:

A

receiver

variable

is

the

name

of

the variable (QW

example RPG program in “Parameters”

on page 3-2) where the information

placed. You need

to declare

the

length of the

receiver variable

b

want from the format. The include file QWDRJOBD contains the definiti

receiver variable structure

depending

on

the

value

used

for the

fo

more

information

on the format, see the

table

in

“JOBD0100

 

Format”

on

You

can

see fromDecthe(decimal

offset)

column of

the

JOBD0100

format

ta

(.1/

on

page 3-31) that at

least

390

bytes plus

additional

bytes

(

for

the

initial

library list

and

the

request

data

are

returned.

“Ac

Value (Initial Library List)—OPM RPG Example” on page 3-19 describes h

determine the lengths of these fields. For

now,

 

you

should

focus

 

on

portion

(390

 

bytes)

of

the

format.

 

 

 

 

 

 

 

 

 

 

 

 

 

You have a choice of receiving the

maximum

or

 

enough

bytes

to

cont

mation

 

in which you are interested. Because

the value of the hold

field

starts

at

decimal

76,

you

could

specify

that

the

receiver

va

(or

any

number

greater

 

than

or

equal

to

86

bytes). It is not neces

when

you

specify

the

length

of

 

the

receiver

variable. Whatever

you

amount

 

of data that is returned. You can truncate a

 

value

in

the

mi

the

format,

 

specify more length than the

format

has,

 

and

so

on.

 

 

For example,

 

assume

that

you

decided

to

receive

the

fixed

informat

390 .(2/ on page 3-7). If

you are

going to

call

 

the

API

once,

no

 

mea

mance

 

gain occurs if you specify anything less

 

than

the

maximum. When

the

length

of your receiver variable,

you

would

usually

use

the

 

len

mation

 

that

you

want to

 

receive. The

length

of

receiver

variable

 

par

set

to a value equal to or less than the

length

that

you

defined

parameter

to

be.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Length

of

Receiver

Variable:

 

You normally

enter

the

length

that

you

have

sp

fied for the receiver variable. Remember that in this example, you

declare the receiver

variable

to

be

390 bytes in length. The length

able parameter will have a value

of 390.3/assignedonpage to3-7)it. You(

could have specified

a different value, but the value must be the

Chapter

3. Common

Information

across APIs—Basic (OPM) 3-Example3

Page 55
Image 55
IBM Version 4 manual Are Based Objects That, Performs Object For, Are described in Required Parameter Group