Retrieve Space User Data (QbnRetrieveSpaceUserData) API
Required Parameter Group:
1 | Qualified user space name | Input | Char(20) |
2 | Associated space identifier | Input | Char(10) |
3 | Object name | Input | Char(20) |
4 | Object type | Input | Char(10) |
5 | Qualified module name | Input | Char(20) |
6 | Error code | I/O | Char(*) |
Default Public Authority: *USE
Service Program: QBNPREPR
Threadsafe: No
The Retrieve Space User Data (QbnRetrieveSpaceUserData) API is used to retrieve data stored with the QbnAddAssociatedSpaceEntry API. This data will be copied into the specified user space, and can be located via the "offset to list data section" in the general data structure, as described in User spaces. The format and content of the data is determined by the user when stored into the associated space of a module using the QbnAddAssociatedSpaceEntry API.
This API is similar to the QbnRetrieveAssociatedSpace API, with two differences:
- It is not necessary for the program or service program from which data is being retrieved to be active in the call stack.
- Data can be retrieved from module objects.
Authorities and Locks
- User Space Authority
- *CHANGE
- User Space Library Authority
- *EXECUTE
- User Space Lock
- *EXCL
- ILE Program, Service Program or Module Authority
- *USE
- ILE Program, Service Program or Module Library Authority
- *EXECUTE
- ILE Program, Service Program or Module Lock
- *SHRRD
Required Parameter Group
- Qualified user space name
- INPUT; CHAR(20)
The qualified name of the user space that is to receive the associated space data. The first 10 characters contain the user space name. The space name is left-justified and padded with blanks. The second 10 characters contain the name of the library where the user space is located. The library name is left-justified and padded with blanks. The library name can be specified with the following special values:
*CURLIB The job's current library *LIBL The library list
- Associated space identifier
- INPUT; CHAR(10)
The associated space identifier must have the following special value:
*USERDATA The type of data from within the associated space to copy into the user space. The special value must be left-justified and padded with blanks.
- Object name
- INPUT; CHAR(20)
The qualified name of the module (*MODULE), ILE program (*PGM) or service program (*SRVPGM) object from which the data will be retrieved. The first 10 characters contain the object name. The object name is left-justified and padded with blanks. The second 10 characters contain the name of the library where the object is located. The library name is left-justified and padded with blanks. The library name can be specified with the following special values:
*CURLIB The job's current library *LIBL The library list
- Object type
- INPUT; CHAR(10)
Special value identifying the type of the object. It must be one of the following values:
*MODULE Module object. *PGM ILE program object. *SRVPGM Service program object.
- Qualified module name
- INPUT; CHAR(20)
If the object from which to retrieve the data is a program or service program, this identifies the library-qualified name of the module from within the program for which the data is retrieved. The first 10 characters contain the module name. The module name is left-justified and padded with blanks. The second 10 characters contain the name of the library where the module was located at the time it was bound into the program or service program. The library name is left-justified and padded with blanks.
If this parameter is all blanks and the object from which to retrieve the data is a program or service program, data will be retrieved for the first module in the object.
If the object for which data is being retrieved is a module, this parameter is required to be all blanks.
- Error code
- I/O; CHAR(*)
The structure in which to return error information. For the format of the structure, see Error code parameter.
Error Messages
Message ID | Error Message Text |
---|---|
CPF2207 E | Not authorized to use object &1 in library &3 type *&2. |
CPF24B4 E | Severe error while addressing parameter list. |
CPF3C3C E | Value for parameter &1 not valid. |
CPF3C90 E | Literal value cannot be changed. |
CPF3CF1 E | Error code parameter not valid. |
CPF5CA2 E | &1 is not a valid associated space identifier parameter. |
CPF5CA4 E | Error occurred while addressing API Parameter. |
CPF5D24 E | Unexpected error occurred during preprocessor processing. |
CPF811A E | User space &4 in &9 damaged. |
CPF9801 E | Object &2 in library &3 not found. |
CPF9802 E | Not authorized to object &2 in &3. |
CPF9803 E | Cannot allocate object &2 in library &3. |
CPF9804 E | Object &2 in library &3 damaged. |
CPF9806 E | Cannot perform function for object &2 in library &3. |
CPF9807 E | One or more libraries in library list deleted. |
CPF9808 E | Cannot allocate one or more libraries on library list. |
CPF980B E | Object &1 in library &2 not available. |
CPF9810 E | Library &1 not found. |
CPF9811 E | Program &1 in library &2 not found. |
CPF9820 E | Not authorized to use library &1. |
CPF9821 E | Not authorized to program &1 in library &2. |
CPF9830 E | Cannot assign library &1. |
CPF9838 E | User profile storage limit exceeded. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
CPF9898 E | &1. |
API introduced: IBM® i 7.2 with PTF
[ Back to top | Program and CL Command APIs | APIs by category ]