BPX1GGI (getgrgid) example

The following code accesses the group database by the ID of the caller and returns a structure identifying the groups by ID. The group ID value is set to 5. For the callable service, see getgrgid (BPX1GGI, BPX4GGI) — Access the group database by ID. For the data structure, see BPXYGIDS — Map data returned for getgrnam and getgrpid. AMODE 64 callers use BPX4GGI (getgrgid) example.
                                              
         MVC   GROUPID,=XL4'00000005'  Value of group ID                
         SPACE ,                                                        
         CALL  BPX1GGI,              Access the group database         +
               (GROUPID,             Input: Group ID                   +
               RETVAL,               Return value: 0 or ->BPXYGIDS     +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ---------------------------------- 
         ICM   R8,B'1111',RETVAL                                        
         BZ    NOGIDS                                                   
         USING GIDS,R8                                                  
*        access the group structure                                     
         DROP  R8                                                       
NOGIDS   EQU   *