Processing a List

This is the preferred method for processing lists. To correctly proces list, do the following:

1. Use

the

offset

to list data.5/sectionpagefield5-9)

(see

 

 

 

2. Look

at

the

number

of

list

entries

field.6/

onin pagethe

5list-10)

(see

 

 

3. Add

the

size

of

each

entry

field

to

get

to

the.7/ starton

of

the

page

5-9)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IBM

may

add

fields

to

the

bottom

of

formats in future releases. If

your

code

uses

 

the

size

of

each entry for a

previous

release,

yo

process

at

the

start

of

each

entry.

 

 

 

 

 

 

 

The example program defines the size of.4/ eachonpageentry5-9.atFor

 

 

 

another

example

that

shows

the

correct

and

incorrect way,

see

“Defini

Format Lengths”

on

page 9-14.

 

 

 

 

 

 

 

 

 

 

List Object API—OPM RPG Example

The example program prints a report that shows all objects that adopt authority.

 

F\

 

 

 

 

 

 

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

 

 

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

 

 

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

 

 

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

 

 

F\

 

 

 

 

 

 

F\Program Name: List objects which adopt owner authority

 

 

F\

 

 

 

 

 

 

F\Language:

 

OPM RPG

 

 

 

 

F\

 

 

 

 

 

 

F\Description:

This program prints a report showing all objects

 

 

F\

 

that adopt owner authority. The two parameters

 

 

F\

 

passed to the program are the profile to be

 

 

F\

 

checked and the type of objects to be listed.

 

 

F\

 

The parameter values are the same as those

 

 

F\

 

accepted by the QSYLOBJP API.

 

 

F\

 

 

 

 

 

 

F\APIs Used:

 

QSYLOBJP - List Objects that Adopt Owner Authority

 

 

F\

 

QUSCRTUS - Create User Space

 

 

F\

 

QUSROBJD - Retrieve Object Description

/

 

F\

 

QUSRTVUS - Retrieve From User Space

/

 

F\

 

 

 

 

 

 

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

 

 

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

 

 

F\

 

 

 

 

 

 

FQSYSPRT O

F

132

OF

PRINTER

 

 

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

 

 

I/COPY QSYSINC/QRPGSRC,QSYLOBJP

 

 

 

I/COPY QSYSINC/QRPGSRC,QUSROBJD

 

 

 

I/COPY QSYSINC/QRPGSRC,QUSGEN

 

 

 

C\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

 

 

I\ Error Code Structure

 

 

 

 

I\

 

 

 

 

 

 

I\ This shows how the user can define the variable length p￿ortion

 

5-4

System API Programming V4R1

 

 

 

 

 

Page 116
Image 116
IBM Version 4 manual Processing a List, List Object API-OPM RPG Example, See Add Size Each Entry Field Get .7/ starton