Retrieve Associated Space (QbnRetrieveAssociatedSpace) API


  Required Parameter Group:

1 Qualified user space name Input Char(20)
2 Call level Input Binary(4)
3 Associated space identifier Input Char(10)
4 Error code I/O Char(*)

  Default Public Authority: *USE

  Service Program: QBNPREPR

  Threadsafe: No

The Retrieve Associated Space (QbnRetrieveAssociatedSpace) API is used by a run-time routine to retrieve data stored with the QbnAddAssociatedSpaceEntry API. This data will be placed into the specified user space. The format of the data is specified by the user when placed into the associated space of a module using the QbnAddAssociatedSpaceEntry API. This API should be called only by a preprocessor run-time routine.


Authorities and Locks

User Space Authority
*CHANGE
User Space Library Authority
*USE
ILE Program or Service Program Authority
*EXECUTE

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. It is left-justified and padded with blanks. The second 10 characters contain the name of the library where the user space is located. It 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

Call level
INPUT; BINARY(4)

The call level parameter identifies the location in the call stack of the ILE program or service program, which contains the associated space data.

0 The current program in the call stack identifies the associated space of the ILE program or service program.
n The nth caller up the stack identifies the associated space of the ILE program or service program. This is a positive number.

Associated space identifier
INPUT; CHAR(10)

The associated space identifier has the following special value:

*PREPROC 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.

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.
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.
CPF9807 E One or more libraries in library list deleted.
CPF9808 E Cannot allocate one or more libraries on library list.
CPF9810 E Library &1 not found.
CPF9820 E Not authorized to use library &1.
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.


API introduced: V3R1
Top | Program and CL Command APIs | APIs by category