Add Server Authentication Entry (QsyAddServerEntry) API
Syntax for QsyAddServerEntry:
#include <qsysvrfn.h> void QsyAddServerEntry (char User_profile[10], char *Server_name, int Length_of_server_name, char *User_ID, int Length_of_user_ID, char *Password, int Length_of_password, void *Error_code);Service Program: QSYSVRFN
Default Public Authority: *USE
Threadsafe: No
The Add Server Authentication Entry (QsyAddServerEntry) API adds server authentication information for use by application requesters in connecting to application servers.
When adding a server authentication entry for a Distributed Relational Database Architecture™ (DRDA®) application that uses TCP/IP, the server name must be entered in upper case.
Authorities and Locks
If the user profile parameter is not *CURRENT or the user profile currently running, then the user profile that calls this API must have *SECADM special authority and *OBJMGT and *USE authorities to the user profile.
Required Parameter Group
- User profile
- INPUT; CHAR(10)
The user profile for which the server authentication entry will be added. The special value *CURRENT may be specified to add an entry for the user profile that calls this API.
- Server name
- INPUT; CHAR(*)
The name of the application server.
- Length of server name
- INPUT; BINARY(4)
The length of the server name that is specified in the server name parameter. The length of the server name must be a value from 1 to 200.
- User ID
- INPUT; CHAR(*)
The user name for which requests will be made to the implementation server.
- Length of user ID
- INPUT; BINARY(4)
The length of the user ID that is specified in the user ID parameter. The length of the user ID must be a value from 0 to 1000. If the length is 0, the user ID will be the same as the name that is specified in the user profile parameter.
- Password
- INPUT; CHAR(*)
The password to be used to authenticate the user when the client attempts to connect to the server.
- Length of password
- INPUT; BINARY(4)
The length of the password that is specified in the password parameter. The length of the password must be a value from 0 to 696. If the length is 0, then no password is supplied on the connection request. If the retain server security data (QRETSVRSEC) system value is set to 0 (do not retain data), then the length of the password is assumed to be 0.
- 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 |
---|---|
CPF2204 E | User profile &1 not found. |
CPF2213 E | Not able to allocate user profile &1. |
CPF2222 E | Storage limit is greater than specified for user profile &1. |
CPF224F E | Server authentication entry already exists. |
CPF225F E | Not all information stored. |
CPF226C E | Not authorized to perform function. |
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. |
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 ]