Hi there, further to my question, I have searched a solution and tested but failed : http://support.sas.com/kb/25/198.html %macro chmod(libname,dataset,permis=777); proc sql; /* get the absolute path of the libname */ select path into: extpath from dictionary.members where libname="%UPCASE(&LIBNAME)"; /* find out if there are any datasets in the library */ select count(path) into: cnt from dictionary.members where libname="%UPCASE(&LIBNAME)"; /* if there are datasets...then issue the below command to change the permissions of the dataset called in this macro to 777 */ %if &cnt > 0 %then %do; filename chmod pipe "chmod &PERMIS %trim(&extpath)/&dataset..sas7bdat"; data _null_; file chmod; run; %end; %mend; /* assign a libref to test the macro */ libname GOT '/*******/******/****'; /* test the macro on the 'WEEKLY_Data' dataset in the 'GOT' library */ %chmod(GOT,WEEKLY_Data);
... View more