BPX1LCR (lchattr) example

The following code changes the attributes of symbolic link /somedir/somesymlink.c. The security label is set and the file change time is set. For the callable service, see lchattr (BPX1LCR, BPX4LCR) — Change the attributes of a file or directory or symbolic link. For the data structures, see BPXYATT — Map file attributes for chattr and fchattr. AMODE 64 callers use BPX4LCR (lchattr) example.
                                              
         MVC   BUFFERA(22),=CL22'/somedir/somesymlink.c'                
         MVC   BUFLENA,=F'22'                                           
         XC    ATT,ATT               Clear ATT                          
         MVC   ATTID,=CL4'ATT '      Eye Catcher                        
         MVC   ATTVERSION,=AL2(ATT#VER)  version                        
         MVC   ATTSECLABEL,=CL08'SYSMULTI'                              
         OI    ATTSETFLAGS3,ATTSECLABELCHG                             +
               Flag Seclabel update                                     
         OI    ATTSETFLAGS2,ATTCTIMETOD                                +
               Set change time to current time                          
         SPACE ,                                                        
         CALL  BPX1LCR,              Change file attributes            +
               (BUFLENA,             Input: Pathname length            +
               BUFFERA,              Input: Pathname                   +
               =A(ATT#LENGTH),       Input: BPXYATT length             +
               ATT,                  Input/output: BPXYATT             +
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------