Retrieve Server Authentication Entries (QSYRTVSE, QsyRetrieveServerEntries) API


Required Parameter Group for QSYRTVSE:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 Return records feedback information Output Char(12)
4 Format name Input Char(8)
5 Starting server name Input Char(*)
6 Length of starting server name Input Binary(4)
7 Starting server option Input Char(1)
8 User profile Input Char(10)
9 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No



  Syntax for QsyRetrieveServerEntries:
 #include <qsysvrfn.h>

 void QsyRetrieveServerEntries
        (void                        *Receiver_variable,
         int                          Length_of_receiver_variable,
         Qsy_RSVRE_Feedback_Info_T   *Return_records_feedback_information,
         char                        *Format_name,
         char                        *Starting_server_name,
         int                          Length_of_starting_server_name,
         char                         Starting_server_option,
         char                         User_profile[10],
         void                        *Error_code);

  Service Program: QSYSVRFN

  Default Public Authority: *USE

  Threadsafe: No

The Retrieve Server Authentication Entries (OPM, QSYRTVSE; ILE, QsyRetrieveServerEntries) API returns a list of server authentication entries for a user profile.


Authorities and Locks

User Profile Authority
*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 that the area can hold.

Length of receiver variable
INPUT; BINARY(4)

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

Returned records feedback information
OUTPUT; CHAR(12)

Information about the entries that are returned in the receiver variable.

See Format of Returned Records Feedback Information for details.

Format name
INPUT; CHAR(8)

The name of the format that is used to retrieve server authentication entries for the user profile.

You can specify this format:

SVRE0100 For a detailed description of this format, see SVRE0100 Format.

Starting server name
INPUT; CHAR(*)

The server name at which to start listing server authentication entries. The server authentication entries are listed in hexadecimal sort sequence by server name.

Possible values follow:

*FIRST Server authentication entries are returned starting with the server that has the smallest hexadecimal value.
server name If an exact match for the starting server name is found, the starting server option parameter indicates whether that server authentication entry is returned.
If an exact match for the starting server name is not found, the listing begins with the first existing server authentication entry for the server name whose hexadecimal value would follow the hexadecimal value of the specified starting server name.

Length of starting server name
INPUT; BINARY(4)

The length of the starting server name. The length of the starting server name may be from 1 to 200.

Starting server option
INPUT; CHAR(1)

This parameter indicates whether the starting server authentication entry is returned when an exact match for the starting server name is found.

Possible values follow:

0 Server authentication entries for server names whose hexadecimal value is greater than the hexadecimal value for the starting server name are returned.
1 Server authentication entries for server names whose hexadecimal value is equal to or greater than the hexadecimal value for the starting server name are returned.

User profile
INPUT; CHAR(10)

The name of the user profile for which the server authentication entries 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.


Receiver Variable Description

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


SVRE0100 Format

Offset Type Field
Dec Hex
0 0 BINARY(4) Length of entry
4 4 BINARY(4) Length of server name
8 8 BINARY(4) CCSID of server name
12 C CHAR(200) Server name
212 D4 BINARY(4) Displacement to user ID
216 D8 BINARY(4) Length of user ID
220 DC BINARY(4) CCSID of user ID
224 E0 CHAR(1) Password stored indicator
CHAR(*) User ID


Format of Returned Records Feedback Information

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 BINARY(4) Number of server authentication entries


Field Descriptions

Bytes available. The number of bytes of data available to be returned to the user in the receiver variable. If all data is returned, bytes available is the same as the number of bytes returned. If the receiver variable was not large enough to contain all of the data, this value is estimated based on the total number of server authentication entries for the user profile and the format specified.

Bytes returned. The number of bytes of data returned to the user in the receiver variable. This is the lesser of the number of bytes available to be returned or the length of the receiver variable.

CCSID of server name. The CCSID of the server name. This will be the default job CCSID of the job that added the server authentication entry.

CCSID of user ID. The CCSID of the user ID. This will be the default job CCSID of the job that last changed the user ID field in the server authentication entry.

Displacement to user ID. The displacement in the entry to the start of the user ID.

Format name. The name of the format that is used to return server authentication entries for a user profile.

Length of entry. The length (in bytes) of the current entry. This length can be used to access the next entry.

Length of server name ID. The length (in bytes) of the server name.

Length of user ID. The length (in bytes) of the user ID.

Number of server authentication entries. The number of complete entries returned in the list of server authentication entries. A value of zero is returned if the list is empty.

Password specified. Indicates whether the server authentication entry has a password associated with it.

Possible values follow:

0 The server authentication entry does not have a password associated with it.
1 The server authentication entry does have a password associated with it.

Server name. The name of the server that the entry is for.

User ID. The user ID that is used on requests to the server.

User profile. The name of the user profile for which the list of server authentication entries is returned.


Error Messages

Message ID Error Message Text
CPFA0AA E Error occurred while attempting to obtain space.
CPF2204 E User profile &1 not found.
CPF2213 E Not able to allocate user profile &1.
CPF2217 E Not authorized to user profile &1.
CPF2222 E Storage limit is greater than specified for user profile &1.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF3C1D E Length specified in parameter &1 not valid.
CPF3C21 E Format name &1 is not valid.
CPF3C3C E Value for parameter &1 not valid.
CPF3C90 E Literal value cannot be changed.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.

API introduced: V4R2

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