The getpwnam callable service gets information about a user. You specify the user by user name.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1GPN): | 31-bit |
AMODE (BPX4GPN): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4GPN with the same parameters.
The name of a fullword that contains the length of User_name.
The name of a field of length User_name_length that contains the name of the user that the program wants information about. The name is specified in the Resource Access Control Facility (RACF®) command that defines the user to the system.
The name of a fullword in which the getpwnam service returns an address, or 0.
If no entry for the specified group name is found, Return_value is set to 0.
If an entry is found, Return_value is set to the address of the BPXYGIDN macro. See BPXYGIDN — Map data returned for getpwnam and getpwuid.
Return_code | Explanation |
---|---|
EINVAL | User_name_length is incorrect; or the user name has an illegal first character (JRUserNameBad). |
EMVSSAF2ERR | The system authorization facility (SAF) Get GMAP service had an error. |
EMVSSAFEXTRERR | The SAF RACROUTE EXTRACT service had an error. |
The name of a fullword in which the getpwnam service stores the reason code. The getpwnam service returns Reason_code only if Return_value is 0. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
RACF Return Code | RACF Reason Code | Explanation |
---|---|---|
8 | 0 | No profile found. |
8 | 4 | If the search is by GID: The GID is not defined. If the search is by group name: The current group is not defined. |
8 | 8 | The group name is not defined. |
8 | 12 | There was an internal error during RACF processing. |
8 | 16 | Recovery could not be established. |
8 | 20 | The current group is incompletely defined. |
There are no restrictions on the use of the getpwnam service.
For an example using this callable service, see BPX1GPN (getpwnam) example.