Retrieve Network Server User Attributes (QFPADRUA) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Format name Input Char(8)
4 Profile name Input Char(10)
5 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Retrieve Network Server User Attributes (QFPADRUA) API retrieves the network server attributes for a user or a group. The functions provided by this API are similar to the Display Network Server User Attributes (DSPNWSUSRA) command.


Authorities and Locks

User profile
*READ

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 the area can hold.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable provided. The length of the receiver variable parameter may be specified up to the size of the receiver variable specified in the user program. If the length of the receiver variable parameter specified is larger than the allocated size of the receiver variable specified in the user program, the results are not predictable. The minimum length is 8 bytes.

Format name
INPUT; CHAR(8)

The format of the information returned. Indicates whether this call is interested in the user characteristics of the profile or the group characteristics of the profile. Profiles can behave as both user and group profiles, and unique enrollment characteristics can be set for each aspect of the profile. You must use one of the following format names:

DRUA0100 The output network server user attributes structure. For more information, see DRUA0100 Format.
DRUA0200 The output network server group attributes structure. For more information, see DRUA0200 Format.

Profile name
INPUT; CHAR(10)

The name of the user or group profile whose network server attributes are to be retrieved. The values can be:

*NWSA The system default network server attributes defined by the Change Network Server Attributes (CHGNWSA) command are retrieved. This value is allowed only when format DRUA0100 is specified.
Name The network server attributes for the specified user or group profile are retrieved.

Usage note: Avoid the use of characters '5B'X, '7B'X, and '7C'X (CCSID 37 characters '$', '#', and '@', respectively) in profile names.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter. If this parameter is omitted, diagnostic and escape messages are issued to the application.


Format of the Retrieved Information

The formats of the information retrieved by this API are listed below. The caller should pass a receiver variable large enough to handle most requests. On return, the bytes available field of the receiver variable will contain the required size of the receiver variable to hold all information from the request. If this is greater than the original receiver variable size passed in, then the caller must allocate a larger receiver variable before retrying the operation.


DRUA0100 Format

The following table shows the format of the network server user attributes.

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 CHAR(12) Reserved
20 14 BINARY(4) Offset Windows® domain list
24 18 BINARY(4) Length Windows domain entries
28 1C BINARY(4) Number Windows domains
32 20 BINARY(4) Offset Windows server list
36 24 BINARY(4) Length Windows server entries
40 28 BINARY(4) Number Windows servers
See note See note See Format of Windows Domain Information Windows domain list
See note See note See Format of Windows Server Information Windows server list
Note:The offsets to the Windows domain list and Windows server list are specified in the offset Windows domain list and offset Windows server list variables, respectively.


DRUA0200 Format

The following table show the format of the network server group attributes.

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 CHAR(10) Group member enrollment
18 12 CHAR(2) Reserved
20 14 BINARY(4) Offset Windows domain list
24 18 BINARY(4) Length Windows domain entries
28 1C BINARY(4) Number Windows domains
32 20 BINARY(4) Offset Windows server list
36 24 BINARY(4) Length Windows server entries
40 28 BINARY(4) Number Windows servers
See note See note See Format of Windows Domain Information Windows domain list
See note See note See Format of Windows Server Information Windows server list
Note: The offsets to the Windows domain list and Windows server list are specified in the offset Windows domain list and offset Windows server list variables, respectively.


DRUA0100 and DRUA0200 Field Descriptions

Bytes available. The length of all data available for the requested format. All available data is returned if enough space is provided.

Bytes returned. The length of all data actually returned. If the data is truncated because the receiver variable is not large enough to hold the data, this value is less than the bytes available.

Group member enrollment. This field indicates whether or not the group members (users in the group) are enrolled to the server. This field is only returned for format DRUA0200. The following are the valid values for this field:

*ALL The group and the users in the group are enrolled to the servers.
*MBRONLY Only the users in the group are enrolled to the servers. The group itself is not enrolled to the servers.
*NONE Only the group is enrolled to the servers. The users in the group are not enrolled to the servers.

Length Windows domain entries. The length in bytes of each element in the list of Windows domains.

Length Windows server entries. The length in bytes of each element in the list of Windows servers.

Number Windows domains. The number of entries in the list of Windows domain names. If this value is 0, then there are no Windows domains in the list.

Number Windows servers. The number of entries in the list of Windows server names. If this value is 0, then there are no Windows servers in the list.

Offset Windows domain list. The offset from the start of the receiver variable to the list of Windows domain entries. A value of zero indicates there are no list entries. See Format of Windows Domain Information for details of the individual entries.

Offset Windows server list. The offset from the start of the receiver variable to the list of Windows server entries. A value of zero indicates there are no list entries. See Format of Windows Server Information for details of the individual entries.

Reserved. Reserved space.

Windows domain list. The list of Windows domain entries. See Format of Windows Domain Information for details of the individual entries.

Windows server list. The list of Windows server entries. See Format of Windows Server Information for details of the individual entries.


Format of Windows Domain Information

The following table describes the layout of the information returned to describe a Windows domain. To locate the first such entry, add the receiver variable start to the value in 'Offset Windows domain list' noted above. Each succeeding entry can be located by adding the 'Length Windows domain entries' size to the address of the current entry.

Offset Type Field
Dec Hex
0 0 CHAR(10) Windows group type
10 A CHAR(2) Reserved
12 C BINARY(4) Displacement to Windows domain name
16 10 BINARY(4) Length of Windows domain name
20 14 BINARY(4) Displacement to Windows user template name
24 18 BINARY(4) Length of Windows user template name
See Note See Note CHAR(*) Windows domain name
See Note See Note CHAR(*) Windows user template name
Note: The displacement to the Windows domain name and Windows user template name are specified in the displacement to Windows domain name and displacement to Windows user template name variables, respectively.


Windows Domain Field Descriptions

Displacement to Windows domain name. The displacement in bytes from the beginning of the entry to the Windows domain name.

Displacement to Windows user template name. The displacement in bytes from the beginning of the entry to the Windows user template name.

Length of Windows domain name. The length of the Windows domain name.

Length of Windows user template name. The length of the Windows user template name.

Reserved. Reserved space.

Windows domain name. This is the name of a domain in which the user is enrolled. The values can be:

*NWSA The user is enrolled to the system default domains that are defined by the Change Network Server Attributes (CHGNWSA) command.
Name The specific name of the domain in which the user is enrolled.

Windows group type. This is the type of group created on a Windows domain.

The values can be:

*GLOBAL A global group was created.
*LOCAL A local group was created.
blank Blanks are returned if retrieving user attributes.

Windows user template name. The name of a Windows user that was used as a template when creating the specified user on Windows. The values can be:

*NONE No user template was used when creating the specified user.
Name The specific name of the user template that was used when creating the specified user.


Format of Windows Server Information

The following table describes the layout of the information returned to describe a Windows server. To locate the first such entry, add the receiver variable start to the value in 'Offset Windows server list' noted above. Each succeeding entry can be located by adding the 'Length Windows server entries' size to the address of the current entry.

Offset Type Field
Dec Hex
0 0 BINARY(4) Displacement to Windows server name
4 4 BINARY(4) Length of Windows server name
8 8 BINARY(4) Displacement to Windows user template name
12 C BINARY(4) Length of Windows user template name
See Note See Note CHAR(*) Windows server name
See Note See Note CHAR(*) Windows user template name
Note: The displacement to the Windows server name and Windows user template name are specified in the displacement to Windows server name and displacement to Windows user template name variables, respectively.


Windows Server Field Descriptions

Displacement to Windows server name. The displacement in bytes from the beginning of the entry to the Windows server name.

Displacement to Windows user template name. The displacement in bytes from the beginning of the entry to the Windows user template name.

Length of Windows server name. The length of the Windows server name.

Length of Windows user template name. The length of the Windows user template name.

Windows server name. The name of a server in which the user is enrolled. The values can be:

*NWSA The user is enrolled to the system default servers that are defined by the Change Network Server Attributes (CHGNWSA) command.
Name The specific name of the server in which the user is enrolled.

Windows user template name. The name of a Windows user that was used as a template when creating the specified user on Windows. The values can be:

*NONE No user template was used when creating the specified user.
Name The specific name of the user template that was used when creating the specified user.


Error Messages

Message ID Error Message Text
CPF2204 E User profile &1 not found.
CPF24B4 E Severe error while addressing parameter list.
CPF2634 E Not authorized to object &1.
CPF3C19 E Error occurred with receiver variable specified.
CPF3C21 E Format name &1 is not valid.
CPF3C24 E Length of the receiver variable is not valid.
CPF3C3C E Value for parameter &1 not valid.
CPF3CF1 E Error code parameter not valid.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPF9999 E Function check. &1 unmonitored by &2 at statement &5, instruction &3.


API introduced: V5R1

[ Back to top | Server Support APIs | APIs by category ]