libraries,

you

may begin to access

information

in the format

for

of information

(in this example, it may be the

request data

valu

The output for

this

program example is as

follows:

 

 

 

 

 

 

 

 

 

 

 

 

à

 

 

Display Messages

 

ð

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

System:

GENSYS9ð

 

 

Queue . . . . . :

QPGMR

 

Program . . . . :

\DSPMSG

 

 

Library

. . . :

QUSRSYS

 

Library . . . :

 

 

 

 

Severity

. . . :

ðð

 

Delivery

. . . :

\HOLD

 

 

Type reply (if required), press Enter.

 

 

 

 

 

 

LIBRARY

- SMITH

 

 

 

 

 

 

 

 

From .

. . :

SMITH

ð7/23/94

12:29:38

 

 

 

 

 

LIBRARY

- QTEMP

 

 

 

 

 

 

 

 

From .

. . :

SMITH

ð7/23/94

12:29:38

 

 

 

 

 

LIBRARY

- QGPL

 

 

 

 

 

 

 

 

From .

. . :

SMITH

ð7/23/94

12:29:38

 

 

 

 

 

LIBRARY

- QBLDCPF

 

 

 

 

 

 

 

From .

. . :

SMITH

ð7/23/94

12:29:38

 

 

 

 

 

LIBRARY

- UTIL

 

 

 

 

 

 

 

 

From .

. . :

SMITH

ð7/23/94

12:29:38

 

 

 

 

 

LIBRARY

- OPENTEST

 

 

 

 

 

 

The handling of

the initial library list

field

is typical of what you

APIs.

 

 

 

 

 

 

 

 

Using

Keys

with List

Spooled

Files

 

API—Example

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This

topic

introduces

a

new

program

named

LSTSPL. Program

LSTSPL

uses

the

 

 

 

List Spooled Files (QUSLSPL) API to determine the spooled file

name,

date

 

 

created,

and

number

of

pages for

all

spooled files

created

by

the

 

 

the LSTSPL program. Unlike the earlier

JOBDAPI

program examples,

where

 

 

 

format

JOBD0100

of

the Retrieve Job Description (QWDRJOBD)

API

return

 

 

dozens

of

fields

 

while we were only interested in the HOLD field, t

 

 

provides

a

keyed

interface that allows LSTSPL to request that

only

the

 

 

fields (spooled file name, date

created,

and

number

of

pages)

be

re

 

 

tion

to

providing

a

keyed interface,

QUSLSPL

also

differs

from QWDRJOBD

 

 

the

QUSLSPL

API

retrieves

a

list

of

all spooled

files

into

a

User

Spac

 

 

while QWDRJOBD retrieves information about one specific job

descriptio

 

 

program

variable.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In

the

 

following

program

example,

all

the

pieces

have

been put

togethe

 

 

OPM RPG program that accesses specific information related

to

spooled

f

 

 

report

listing

this

information is created. The program

example

does

not

 

 

API-related errors. Any errors that are received are

returned

as

exc

 

 

sages.1/.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

 

 

 

 

 

 

 

 

 

 

F\

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F\ Program Name:

 

 

LSTSPL

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F\

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F\ Program Language:

 

OPM RPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F\

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F\ Descriptive Name:

 

List Spooled Files for Current User

 

 

 

 

 

 

 

 

 

 

 

F\

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F\ Description:

 

 

This example shows the steps necessary

 

 

 

 

 

 

 

 

 

 

 

F\

 

 

 

 

 

to process keyed output from an API.

 

 

 

 

 

 

 

 

3-24

System

API Programming V4R1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Page 76
Image 76
IBM Version 4 manual With List, Spooled, Jobdapi