The getpwent callable service gets information about a user. Each time you use the getpwent service, you get information about the next user entry in the user database.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1GPE): | 31-bit |
AMODE (BPX4GPE): | 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 BPX4GPE with the same parameters.
The name of a fullword in which the getpwent service returns an address, or 0.
If no more user entries exist in the user database, or if an error is encountered, Return_value is set to 0.
If an entry is found, Return_value is set to the address of a data area that is mapped by the BPXYGIDN macro. The first area contains the fullword length of the user name, followed by the user name padded with blanks. See BPXYGIDN — Map data returned for getpwnam and getpwuid.
Return_code | Explanation |
---|---|
EMVSSAF2ERR | The system authorization facility (SAF) or RACF® Get GMAP service had an error. |
EMVSSAFEXTRERR | The SAF or RACF RACROUTE EXTRACT service had an error. |
The name of a fullword in which the getpwent service stores the reason code, or 0. The getpwent service returns Reason_code only if Return_value is 0. Reason_code is 0 when no more user entries exist in the database. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes. The reason code for EMVSSAF2ERR or EMVSSAFEXTRERR contains the RACF return and reason codes, respectively, in the two low-order bytes.
RACF Return Code | RACF Reason Code | Explanation |
---|---|---|
8 | 12 | Internal error during RACF processing |
8 | 16 | Unable to establish recovery |
8 | 20 | The current user is incompletely defined. |
If a user does not have a RACF OMVS segment but is given access to the OMVS DEFAULT user, no entry is returned on a getpwent call. This is because the user is not defined as an OMVS user in the user database.
There are no restrictions on the use of the getpwent service.
For an example using this callable service, see BPX1GPE (getpwent) example.