We are using infile of all logs in a folder with the code:-
infile 'foldername/*.log'
There is an owner information near the log name, in Linux.
Can we use this owner information in sas ?
Instead of all the logs in the folder - to infile only logs with a specific owner (user name) that created the logs.
The INFILE wildcard syntax does not support a filter by owner.
You could use an OS command (issued through FILENAME PIPE or SYSTASK) to generate a list of matching files.
find ./*.log -maxdepth 1 -user <ownerid> -ls
Or you can use DATA step functions to FOPEN each file and retrieve "Owner Name" info using FINFO. Documentation here.
The INFILE wildcard syntax does not support a filter by owner.
You could use an OS command (issued through FILENAME PIPE or SYSTASK) to generate a list of matching files.
find ./*.log -maxdepth 1 -user <ownerid> -ls
Or you can use DATA step functions to FOPEN each file and retrieve "Owner Name" info using FINFO. Documentation here.
Thanks we shall check it.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.