The getgrent callable service gets information about a group and its members. Each time you use the getgrent service, you get information about the next group entry in the group database.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1GGE): | 31-bit |
AMODE (BPX4GGE): | 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 BPX4GGE with the same parameters. The address returned is a fullword (below the bar).
The name of a fullword in which the getgrent service returns an address, or 0. If no more group entries exist in the group 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 mapped by the BPXYGIDS macro. The first area contains the fullword length of the group name, followed by the group name, padded with blanks. See BPXYGIDS — Map data returned for getgrnam and getgrpid. The address returned is 31 bits for both AMODE=31 and AMODE 64 callers.
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 where the getgrent service stores the reason code or 0. The getgrent service returns Reason_code only if Return_value is 0. Reason_code is 0 when no more group 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 in the case of 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 group is incompletely defined. |
There are no restrictions on the use of the getgrent service.
For an example using this callable service, see BPX1GGE (getgrent) example.