BPX4LCO (lchown) example

The following code changes the owner of symbolic link /somedir/somesymlink.c from the current owner to that specified by USERID and GROUPID. For the callable service, see lchown (BPX1LCO, BPX4LCO) — Change the owner or group of a file, directory, or symbolic link. AMODE 31 callers use BPX1LCO (lchown) example.
                                              
         MVC   BUFFERA(22),=CL22'/somedir/somesymlink.c'                
         MVC   BUFLENA,=F'22'                                           
       MVC   USERID,..             New owner UID from stat              
       MVC   GROUPID,..            New owner GID from stat              
         SPACE ,                                                        
         CALL  BPX4LCO,              Change owner and group of a file  +
               (BUFLENA,             Input: Pathname length            +
               BUFFERA,              Input: Pathname                   +
               USERID,               Input: New owner UID              +
               GROUPID,              Input: New owner GID              +
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------