User Spaces
User spaces are objects that consist of a collection of bytes used for
storing user-defined information.
They are permanent objects that are located in either the system domain or the user domain. They have an object type of *USRSPC and a maximum size of 16MB.
A user space is used when information about more than one object is being requested. For example returning either a list of members in a file or objects in a library.
APIs that return information to a caller generally return the information in a user space (used by list APIs) or a receiver variable (used by retrieve APIs).
Most lists returned by APIs are made up of a series of entries where each entry is a data structure.
When you use one of the list APIs, the parameter list requires that you name the user space that will be used.
You can use these APIs to:
o Create and delete user spaces
o Change and retrieve the contents of user spaces
o Change and retrieve information about user spaces
Following are some of the advantages of using user spaces:
o User spaces can be automatically extendable.(16 MB)
o User spaces can be shared across jobs.
o User spaces can exist across IPLs.
The disadvantage of using a receiver variable when it may be too small for the amount of data being returned is that the API must be called again to receive the remaining data.
QSYLOBJP - List Objects that Adopt Owner Authority
QUSCRTUS - Create User Space
QUSPTRUS - Retrieve Pointer to User Space
QUSROBJD - Retrieve Object Description
When to use USRSPC & Data queues?
Use user queues when:
- You have a programming background in or prefer to program in C or
MI.
- You need the additional performance of an API for creating and
deleting and MI instructions for manipulating entries.
- You do not need to create a user-domain queue into a library where
the QALWUSRDMN system value does not permit user-domain user
objects when at security level 40 or 50.
No comments:
Post a Comment