List Objects That Adopt Owner Authority (QSYLOBJP) API


  Required Parameter Group:

1 Qualified user space name Input Char(20)
2 Format name Input Char(8)
3 User profile name Input Char(10)
4 Object type Input Char(10)
5 Continuation handle Input Char(20)
6 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: Yes

The List Objects That Adopt Owner Authority (QSYLOBJP) API puts a list of objects that adopt an object owner's authority into a user space.

This API provides information similar to that provided by the Display Program Adopt (DSPPGMADP) command.


Authorities and Locks

User Space Authority
*CHANGE
Authority to Library Containing User Space
*EXECUTE
User Profile Authority
*OBJMGT

Required Parameter Group

Qualified user space name
INPUT; CHAR(20)

The name of the existing user space to which the list of objects that adopt a user's authority is returned. The first 10 characters specify the user space name, and the second 10 characters specify the library.

You can use these special values for the library name:

*CURLIB The current library is used to locate the user space. If there is no current library, QGPL (general purpose library) is used.
*LIBL The library list is used to locate the user space.

Format name
INPUT; CHAR(8)

The name of the format that returns information on the objects that adopt a user's authority.

You can specify these formats:

OBJP0100 Each entry contains the object name, library, type, object in use indicator, auxiliary storage pool (ASP) device name of library, and ASP device name of object.
OBJP0110 This format only returns path names for objects in directories. Each entry contains the offset to the path name, the length of the path name, ASP device name of object, and the path name value.
OBJP0200 Each entry contains the same information as format OBJP0100 plus the object attribute and descriptive text.

User profile name
INPUT; CHAR(10)

The user name for which the list of objects that adopt the user's authority is returned.

You can specify the following special value:

*CURRENT The list of objects that adopt the authority of the user currently running is returned. If *CURRENT is used, the name of the current user is returned in the list header section of the user space.

Object type
INPUT; CHAR(10)

The type of object for which the list of objects that adopt the user's authority is returned.

You can specify only the following special values:

*ALL Return entries for all object types that adopt authority that is supported by the requested format name.
*PGM Return entries for programs that adopt authority.
*SQLPKG Return entries for SQL packages that adopt authority.
*SRVPGM Return entries for service programs that adopt authority.
*JVAPGM Return entries for stream files that have attached JAVA programs that adopt authority.

Continuation handle
INPUT; CHAR(20)

The handle used to continue from a previous call to this API that resulted in partially complete information. You can determine if a previous call resulted in partially complete information by checking the Information Status variable in the generic user space header following the API call.

If the API is not attempting to continue from a previous call, this parameter must be set to blanks. Otherwise, a valid continuation value must be supplied. The value may be obtained from the list header section of the user space used in the previous call. When continuing, the first entry in the returned list is the entry that immediately follows the last entry returned in the previous call.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


User Space Variables

The following tables describe the order and format of the data returned in the user space. For detailed descriptions of the fields in the tables, see Field Descriptions.


Input Parameter Section

Offset Type Field
Dec Hex
0 0 CHAR(10) User space name specified
10 0A CHAR(10) User space library name specified
20 14 CHAR(8) Format name
28 1C CHAR(10) User name specified
38 26 CHAR(10) Object type
48 30 CHAR(20) Continuation handle


Header Section

Offset Type Field
Dec Hex
0 0 CHAR(10) User name
10 0A CHAR(20) Continuation handle


OBJP0100 Format

Offset Type Field
Dec Hex
0 0 CHAR(10) Object name
10 0A CHAR(10) Library name
20 14 CHAR(10) Object type
30 1E CHAR(1) Object in use
31 1F CHAR(10) ASP device name of library
41 29 CHAR(10) ASP device name of object


OBJP0110 Format

Offset Type Field
Dec Hex
0 0 CHAR(10) Offset to path name
4 4 BINARY(4) Length of path name
8 8 CHAR(10) ASP device name of object
    CHAR(*) Path name


OBJP0200 Format

Offset Type Field
Dec Hex
0 0 CHAR(10) Object name
10 0A CHAR(10) Library name
20 14 CHAR(10) Object type
30 1E CHAR(1) Object in use
31 1F CHAR(10) Attribute
41 29 CHAR(50) Text description
91 5B CHAR(10) ASP device name of library
101 65 CHAR(10) ASP device name of object


Field Descriptions

ASP device name of library. The auxiliary storage pool (ASP) device name where the object's library is stored. If the object's library is in the system ASP or one of the basic user ASPs, this field contains *SYSBAS.

ASP device name of object. The auxiliary storage pool (ASP) device name where the object is stored. If the object is in the system ASP or one of the basic user ASPs, this field contains *SYSBAS.

Attribute. The object attribute.

Continuation handle (header section). A continuation point for the API. This value is set based on the contents of the Information Status variable in the generic header for the user space. The following situations can occur:

Continuation handle (input section). Used to continue from a previous call to this API which resulted in partially complete information.

Format name. The name of the format used to return information on the objects that adopt authority.

Length of path name. The length, in bytes, of the path name.

Library name. The name of the library containing the user space or object.

Object name. The name of the object that adopts the user's authority.

Object in use. Whether the object is in use when the API tries to access it. If the object is in use, the API is not able to determine if the object adopts the user's authority. If the object is in use, this field is Y. If not, this field is N.

Object type. Possible values are:

Offset to path name. The offset in the user space to the start of the path name.

Path name. The path name of the object that adopts the user's authority.

The structure of the path name returned is:

Description Type
CCSID of the returned path name Binary(4)
Country or region ID Char(2)
Language ID Char(3)
Reserved field Char(3)
Path type Binary(4)
Number of bytes in the path name Binary(4)
Path delimiter Char(2)
Reserved field Char(10)
Path name value Char(*)

Text description. The text description of the object.

User name. The name of the owner of the object.

User name specified. The name of the user for which the list of objects that adopt the user's authority is returned.

User space library name specified. The name of the library that contains the user space.

User space name specified. The name of the user space to which the list of objects that adopt the users authority is returned.


Error Messages

Message ID Error Message Text
CPF22FD E Continuation handle not valid for API &1.
CPF2204 E User profile &1 not found.
CPF2213 E Not able to allocate user profile &1.
CPF2217 E Not authorized to user profile &1.
CPF3CF1 E Error code parameter not valid.
CPF3C21 E Format name &1 is not valid.
CPF3C31 E Object type &1 is not valid.
CPF3C90 E Literal value cannot be changed.
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.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API introduced: V2R2

[ Back to top | Security APIs | APIs by category ]