IBM Version 4 Universal Remote User Manual


 
Additional Information about List APIs and a User Space
Before you can use a list API to create a list, the *USRSPC object must exist.
If the user space is too small to contain the list and you have *CHANGE authority
to the user space, the list API extends the user space to the nearest page
boundary. If the user space is too small and you do not have *CHANGE authority,
an authority error results. An extended user space is not truncated when you run
the API again.
When you are creating a list into a user space and the user space cannot hold all
of the available information (the list is greater than 16MB in length), the API places
as much information as possible in the user space and sends a message (typically
CPF3CAA) to the user of the API. The returned list contains only the number of
entries that can fit inside the user space (not the total number of entries available).
Listing Database File Members with a CL Program—Example
To generate a list of members that start with M and are in 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 ᑍ/ +
'1') /ᑍ OVERRIDE PROCESSING ᑍ/
ENDPGM
2-22 System API Programming V4R1