BPX1GPN (getpwnam) example

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 64 callers use BPX4GPN (getpwnam) example.
                                              
         MVC   USERNLEN,=F'8'                                           
         MVC   USERNAME(8),=CL8'Pebbles'                                
         SPACE ,                                                        
         CALL  BPX1GPN,              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                       +
               VL,MF=(E,PLIST)       ----------------------------------