Chapter 3. Common

Information

across

APIs—Basic

(OPM)

Example

 

 

 

 

 

Through

the use of several examples, this chapter provides informatio

to

use

original program

model (OPM)

APIs in your programs. The primary

programs

in this chapter are also

shown in additional languages in “Ori

Program

Model

(OPM) APIs—Examples” on

page B-2.

In the examples, the following are focus items:

Ÿ Description of an API by section

ŸFixed-length formats

Ÿ Variable-length fields as output

ŸOptional parameters

The

Retrieve

Job Description Information (QWDRJOBD) API is used as

tion

for

the

examples in this chapter. The QWDRJOBD API has been i

“Retrieve

Job

Description

Information API—Example” on

page 3-29 for yo

you

would

like

to refer

to it as you read this

chapter.

For details on the OS/400 APIs, referSystem toAPI theReference, SC41-5801.

Original Program Model (OPM)

API–Scenario

 

 

 

 

 

 

 

 

 

In

this

chapter, accessing information from a job

description is

use

how

to

code

APIs. While this may not

be what your application

requi

use

the

same approach to access information when

you use most of t

Assume that you are interested in accessing the

value

of

the

hold

Retrieve Job Description (RTVJOBD) command. The hold parameter deter

whether

the

job

is

held on

the

job

queue. Two

values

are

supporte

*NO

 

The

job

is

not

held.

 

 

 

 

 

 

*YES

 

The

job

is

held

on

the

job

queue.

 

 

 

 

Finding the API Name

to

Use

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A first

step

in finding the correct API is to

identify

the

part

o

that

is

most

closely

related

to the function

in

which

you

are

inter

If

you

want

to

access information

from

a

job

description,

for

examp

know

that

a

job description object is considered

part

of

the

work

 

tion. Next, you would turn to that SystemchapterAPIofReftherence.

 

 

 

 

 

 

Within each

chapterSystemof theAPI

Reference, the

APIs

are

listed

 

in

alphabe

ical

order by

the

spelled-out

form

of

the

API

name. The

API

names

c

that are similar to the OS/400 licensed program: change, create, remov

retrieve. Other verbs, such as

list

and set, you may not be familia

information

on

verbs, see Figure

2-1

on

page 2-2. If

you want to

acc

tion from

a

job description, the verb

retrieve is

a good place

to

Retrieve functions are available for several work management objects, areas, job descriptions, and job queues. Retrieve functions are also

Copyright IBM Corp. 1997

3-1

Page 53
Image 53
IBM Version 4 manual Information, Original Program Model OPM API-Scenario, Job Held Queue