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

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.

SAS Hackathon registration is open! Build your skills. Make connections. Enjoy creative freedom. Maybe change the world.

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.

SAS Hackathon registration is open! Build your skills. Make connections. Enjoy creative freedom. Maybe change the world.
J111
Obsidian | Level 7

Thanks we shall check it.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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