Open List of Authorized Users (QGYOLAUS) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 List information Output Char(80)
4 Number of records to return Input Binary(4)
5 Format name Input Char(8)
6 Selection criteria Input Char(10)
7 Group profile name Input Char(10)
8 Error Code I/O Char(*)

  Optional Parameter:

9 Profile name Input Char(10)

  Default Public Authority: *USE

  Threadsafe: No

The Open List of Authorized Users (QGYOLAUS) API provides information about the authorized users of the system. It returns a list of authorized user names that meet the selection criteria specified by the caller of the API and information about those users. This API provides information similar to the Display Authorized Users (DSPAUTUSR) command and the Retrieve Authorized Users (QSYRAUTU) API.


Differences between QSYRAUTU and QGYOLAUS

The QGYOLAUS API returns the same information that the Retrieve Authorized Users (QSYRAUTU) API provides, but takes a complete snapshot at once and allows subsequent records to be obtained through the Get List Entries (QGYGTLE) API.


Authorities and Locks

Authority to User Profiles in List of Authorized Users
*READ

Note: Only those profiles to which you have *READ authority are returned in the list.


Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The receiver variable that receives the information requested. You can specify the size of the area to be smaller than the format requested as long as you specify the length parameter correctly. As a result, the API returns only the data that the area can hold.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable. If the length is larger than the size of the receiver variable, the results are not predictable.

List Information
OUTPUT; CHAR(80)

Information about the list created by this program. For a description of the layout of this parameter, see Open list information format.

Number of records to return
INPUT; BINARY(4)

The number of records in the list to put into the receiver variable after filtering and sorting has been done.

If -1 is specified for this parameter, the entire list is built synchronously.

If 0 is specified for this parameter, the entire list is built asynchronously in a server job.

If a positive number of records to return is specified, at least that many records will be built synchronously and the remainder will be built asynchronously in a server job.

Format name
INPUT; CHAR(8)

The name of the format that is used to return information about the authorized users.

You can specify these formats:

AUTU0100 Each entry contains the user name, an indicator that specifies whether the user is a user profile or a group profile, and an indicator that specifies whether the user is a group that has members.
AUTU0150 Each entry contains the same information as AUTU0100 plus the text description for the user.
AUTU0200 Each entry contains the same information as AUTU0100 plus group profiles are returned for users who are members of one or more groups.
AUTU0250 Each entry contains the same information as AUTU0200 plus the text description for the user.

Selection criteria
INPUT; CHAR(10)

This parameter specifies which users are returned. Possible special values follow:

*ALL All user profile names and group profile names are returned. This is the same list of users that are returned by the List Authorized Users (QSYLAUTU) API.
*USER User names that are not group profiles are returned. (Users that do not have a GID specified in their user profiles.)
*GROUP User names that are group profiles are returned. (Users that have a GID specified in their user profiles.)
*MEMBER User names that are members of the group specified by the group profile name parameter are returned. The users who do not have any group profiles can be retrieved by specifying *NOGROUP for the group profile name. The group profile name parameter must contain a valid group profile name or *NOGROUP when the selection criteria is *MEMBER.

Group profile name
INPUT; CHAR(10)

The group profile whose members are to be returned. The profile specified must exist and must be a group profile.

A group profile name or *NOGROUP is required if *MEMBER is specified for the selection criteria. The group profile name must be *NONE if the selection criteria is not *MEMBER.

*NONE No group profile is specified.
group name Users who are a member of this group are returned.
*NOGROUP Users who are not a member of any group are returned.

Error code
I/O; CHAR(*)

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


Optional Parameter

Profile name
INPUT; CHAR(10)

The profile names to include in the list. The selection criteria determines which users are included in the list. Specifying a profile name can further limit the names that are returned.

The profile name can be a simple name, a generic name, or the special value *ALL. If not provided, *ALL is used as a default. Possible values follow:

*ALL All profiles are listed.
Profile name If a generic profile name is specified, the profiles that match the generic name are returned. If a simple profile name is specified, only that profile is returned.

Receiver Variable Description

The following tables describe the order and format of the data returned in the receiver variable for each profile name in the list. For detailed descriptions of the fields in the tables, see Field Descriptions.


AUTU0100 Format

Offset Type Field
Dec Hex
0 0 CHAR(10) Profile name
10 0A CHAR(1) User or group indicator
11 0B CHAR(1) Group members indicator


AUTU0150 Format

Offset Type Field
Dec Hex
0 0 CHAR(10) Profile name
10 0A CHAR(1) User or group indicator
11 0B CHAR(1) Group members indicator
12 0C CHAR(50) Text description


AUTU0200 Format

Offset Type Field
Dec Hex
0 0 CHAR(10) Profile name
10 0A CHAR(1) User or group indicator
11 0B CHAR(1) Group members indicator
12 0C BINARY(4) Number of group profiles
16 10 ARRAY(16) of CHAR(10) Group profiles


AUTU0250 Format

Offset Type Field
Dec Hex
0 0 CHAR(10) Profile name
10 0A CHAR(1) User or group indicator
11 0B CHAR(1) Group members indicator
12 0C CHAR(50) Text description
62 3E CHAR(2) Reserved
64 40 BINARY(4) Number of group profiles
68 44 ARRAY(16) of CHAR(10) Group profiles


Field Descriptions

Group members indicator. Whether this user is a group that has members. Possible values follow:

0 The user is not a group, or is a group but does not have any members.
1 The user is a group that has members.

Group profiles. The array of group profiles for the user. The number of group profiles field indicates how many entries are in the array.

Number of group profiles. The number of group profiles that are returned in the group profiles field. The number of group profiles will be zero if the user is not a member of any group.

Profile name. The name of an authorized user for whom information is returned.

Reserved. An ignored field.

Text description. The descriptive text for the user profile.

User or group indicator. Whether this user is a user profile or a group profile. Possible values follow:

0 User profile
1 Group profile


Error Messages

Message ID Error Message Text
CPF22B4 E Group profile &1 not found.
CPF22B7 E Profile &1 is not a group profile.
CPF22E0 E Group profile name cannot be *NONE when selection criteria is *MEMBER.
CPF22ED E Group profile name must be *NONE when selection criteria is not *MEMBER.
CPF22EE E Selection criteria is not valid.
CPF24B4 E Severe error while addressing parameter list.
CPF3C19 E Error occurred with receiver variable specified.
CPF3C21 E Format name &1 is not valid.
CPF3C3A E Value for parameter &2 for API &1 not valid.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF9821 E Not authorized to program &1 in library &2.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
GUI0002 E &2 is not valid for length of receiver variable.
GUI0027 E &1 is not valid for number of records to return.


API introduced: V4R1

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