BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
J111
Quartz | Level 8

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. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

View solution in original post

2 REPLIES 2
ChrisHemedinger
Community Manager

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.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
J111
Quartz | Level 8

Thanks we shall check it.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 750 views
  • 1 like
  • 2 in conversation