>>-getgrent--stem----------------------------------------------><
Function
getgrent invokes
the getgrent callable service to retrieve a group database entry.
- stem
- The name of a stem variable used to return the information. Upon
return, stem.0 contains the number of variables
returned. To access the status values, you can specify a numeric value
(see REXX predefined variables) or the predefined variable
beginning with GR_ used to derive the appropriate numeric value. For
example, you can specify stem.2 or stem.gr_gid to
access the group ID:
Variable |
Description |
---|
GR_GID |
The group ID |
GR_MEM |
The stem index of the first member
name returned |
GR_MEMBERS |
The number of members returned |
GR_NAME |
The name of the group |
Usage notes
- The service is intended to be used to search the group database
sequentially. The first call to this service from a given task returns
the first group entry in the group database. Subsequent calls from
the same task return the next group entry found, until no more entries
exist, at which time a RETVAL of 0 is returned.
- The setgrent service can be used to reset this sequential search.