The getgrgid callable service gets information about a group and its members. You specify the group by the group ID (GID).
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1GGI): | 31-bit |
AMODE (BPX4GGI): | 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 BPX4GGI with the same parameters. The address returned is a fullword (below the bar).
The name of a fullword containing the ID of the group you want information about.
The name of a fullword in which the getgrgid service returns an address, or 0. If no entry for the specified group ID is found, Return_value is set to 0. If an entry is found, Return_value is set to the address of 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.
If an entry is found and function code ThliEP_GidNameSet was set in ThliEP_FunctionCode prior to making this call, then Return_value is set to the address of the area in the BPXYTHLI where group name length and group name are set, as per the BPXYGIDS macro.
The address returned is 31 bits for both AMODE 31 and AMODE 64 callers.
Return_code | Explanation |
---|---|
EMVSSAFEXTRERR | The system authorization facility (SAF) RACROUTE EXTRACT service had an error. |
EMVSSAF2ERR | The (SAF) Get GMAP service had an error. |
The name of a fullword in which the getgrgid service stores the reason code. The getgrgid 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.
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 | 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. |
Return_value is set to the output area. This is mapped by both the ThliExtendedGIDName structure in BPXYTHLI — Thread-level information, and by BPXYGIDS — Map data returned for getgrnam and getgrpid. If no entry for the specified group ID is found, Return_value is set to 0.
The ThliEP_FunctionCode is cleared prior to returning to the caller; so, the invoker will need to set the ThliEp_FunctionCode before each invocation of the BPX1GGI/BPX4GGI service if the ThliEP_GIDNameSet function is to be used.
There are no restrictions on the use of the getgrgid service.
For an example using this callable service, see BPX1GGI (getgrgid) example.