The following code accesses the group database by the
user ID of the caller and returns a structure identifying
the groups by name. For the callable service, see
getpwnam (BPX1GPN, BPX4GPN) — Access the user database by user name. For the data structure, see
BPXYGIDN — Map data returned for getpwnam and getpwuid. AMODE 31 callers
use
BPX1GPN (getpwnam) example.
MVC USERNLEN,=F'8'
MVC USERNAME(8),=CL8'Pebbles'
SPACE ,
CALL BPX4GPN, Access the user database +
(USERNLEN, Input: Length of user name +
USERNAME, Input: Name of user +
RETVAL, Return value 0 or ->BPXYGIDN +
RETCODE, Return code +
RSNCODE), Reason code +
MF=(E,PLIST) ----------------------------------