Using User Space APIs
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 16 MB. You can save and restore user spaces to other systems. If, however, the user spaces contain pointers, you cannot restore the pointers even if you want to restore them to the same system.
You can use the user space APIs to:
- Create user spaces to be used by list APIs to generate lists of data.
- Store pointers.
- Store large amounts of data. You can create a user space as large as 16 megabytes. You cannot create a data area larger than 2000 bytes.
- Save information in user space objects, and save and restore the object with the information in it using CL commands.
- Pass data from job to job or from system to system.
Note: If the allow user domain (QALWUSRDMN) system value contains only the QTEMP library, you can use only the user space APIs to create and manipulate user domain spaces in library QTEMP. You cannot use the Retrieve Pointer to User Space API.
The performance benefits of using optimally aligned spaces may vary over time, so creating a user space with optimum alignment is highly recommended, even if an application does not experience a performance benefit from using an optimally aligned user space on one particular release.
[ Back to top | >Object APIs | APIs by category ]