hi all ,
would you pleas help on sas script that identify the files in unix environment that does not have owner name and send the report for same please. so that i can verify and delete accordingly.
Sample file in /home/data - directory that does not have owner name
-rwxrwx--- 1 759320 sssssss 24167 24 Oct 2008 FFFFFFFFF.TXT
I haven't worked with unix for some time, but why do you want to bring sas into this problem, such things should be solvable with bash-commands easily.
Humbly asking @Kurt_Bremser for to share his wisdom.
I'm coming!
That is a UNIX one-liner:
find /home/data -nouser
To read the list of resulting names into a SAS dataset, do
filename oscmd pipe "find /home/data -nouser 2>&1";
data names;
infile oscmd truncover;
input name $200.;
run;
The "2>&1" construct reroutes stderr output to stdout, so in case of a problem you get one or a few observation(s) containing the problem message.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.