Additional Information about

List

APIs

and

a User

Space

 

 

 

 

 

 

 

 

 

 

Before

you can

use

a

list

API

 

to

create

a

list,

the

*USRSPC

object

If

 

the

user

space

is

too

small

to

contain

the list

and

you

have

*CHA

to

the

user space, the list API extends the user space to the nea

boundary. If

the

user

space is too small and

you

 

do

not

have *CHANGE

an

authority

error results. An extended user

space

 

is

not

truncated

w

the

 

API

again.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

When

you are

creating a list into a user space and the user space

of

the

available information (the list is greater than 16MB in length),

as

much

information

as

possible

in

the

user

space and sends a message

CPF3CAA)

to

the

user

of

the

API. The

returned

list

contains

only

the

numb

entries

that

can

fit

inside

the

user

space

(not

the

total number

of

Listing

Database

File

Members

with

a

CL

Program—Example

 

 

 

To generate

a

list

of

members

thatM andstartare winth file QCLSRC in library

 

 

QGPL,

specify

the

following:

 

 

 

 

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

 

 

/\

 

 

 

 

 

 

 

 

\/

 

 

/\ PROGRAM:

LSTMBR2

 

 

 

 

 

\/

 

 

/\

 

 

 

 

 

 

 

 

\/

 

 

/\ LANGUAGE:

CL

 

 

 

 

 

 

\/

 

 

/\

 

 

 

 

 

 

 

 

\/

 

 

/\ DESCRIPTION:

THIS PROGRAM WILL GENERATE A LIST OF MEMBERS,

\/

 

 

/\

 

 

THAT START WITH M, AND PLACE THE LIST INTO A

\/

 

 

/\

 

 

USER SPACE NAMED EXAMPLE IN LIBRARY QGPL.

\/

 

 

/\

 

 

 

 

 

 

 

 

\/

 

 

/\ APIs USED:

QUSCRTUS, QUSLMBR

 

 

\/

 

 

/\

 

 

 

 

 

 

 

 

\/

 

 

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

 

 

PGM

 

 

 

 

 

 

 

 

 

 

 

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

 

 

/\

CREATE A \USRSPC OBJECT TO PUT THE LIST INFORMATION INTO.

\/

 

 

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

 

 

CALL QUSCRTUS

 

 

 

 

 

 

+

 

 

 

('EXAMPLE

QGPL

 

' /\ USER SPACE NAME AND LIB

\/ +

 

 

 

'EXAMPLE

'

 

 

/\ EXTENDED ATTRIBUTE

\/ +

 

 

 

X'ððððð12C'

 

 

/\ SIZE OF USER SPACE

\/ +

 

 

 

' '

 

 

 

 

/\ INITIALIZATION VALUE

\/ +

 

 

 

'\CHANGE

'

 

 

/\ AUTHORITY

 

\/ +

 

 

 

'USER SPACE FOR QUSLMBR EXAMPLE

')

 

 

 

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

 

 

/\

LIST THE MEMBERS BEGINNING WITH "M" OF A FILE CALLED

\/

 

 

/\

QCLSRC FROM LIBRARY QGPL USING THE OUTPUT FORMAT MBRLð2ðð￿. \/

 

 

/\

OVERRIDE PROCESSING SHOULD OCCUR.

 

\/

 

 

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

 

 

 

CALL QUSLMBR

 

 

 

 

 

 

+

 

 

 

('EXAMPLE

QGPL

 

' /\ USER SPACE NAME AND LIB

\/ +

 

 

 

'MBRLð2ðð'

 

 

/\ FORMAT NAME

 

\/ +

 

 

 

'QCLSRC

QGPL

 

' /\ DATABASE FILE AND LIBRARY

\/ +

 

 

 

'M\

 

'

 

/\ MEMBER NAME

 

\/ +

 

 

ENDPGM

'1')

 

 

 

/\ OVERRIDE PROCESSING

\/

 

 

 

 

 

 

 

 

 

 

 

2-22System API Programming V4R1

Page 42
Image 42
IBM Version 4 manual User, Listing, Additional Information about