BPX1CHO (chown) example

The following code changes the owner of /somedir/somefile.c from the current owner to that specified by USERID and GROUPID. For the callable service, see chown (BPX1CHO, BPX4CHO) — Change the owner or group of a file or directory. AMODE 64 callers use BPX4CHO (chown) example.
                                              
         MVC   BUFFERA(20),=CL20'/somedir/somefile.c'                   
         MVC   BUFLENA,=F'20'                                           
       MVC   USERID,..             New owner UID from stat            07
       MVC   GROUPID,..            New owner GID from stat            07
         SPACE ,                                                        
         CALL  BPX1CHO,              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                       +
               VL,MF=(E,PLIST)       ----------------------------------