BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
japelin
Rhodochrosite | Level 12

Hello,

 

I want full path of filename using " * ". 

But follow code gets only "c:\temp\*.csv".

filename test "c:\temp\*.csv";

data want;
  infile test dsd;
  length path $256;
  input a b;
  path=pathname('path');
run;

What I want is the value of the following path variable.

c:\temp\a.csv

c:\temp\b.csv

c:\temp\c.csv

 

 

I can get path value by using filename with pipe, dir command and loop proc import, but if i use filename with " * " is easy.

 

Thanks all help.

1 ACCEPTED SOLUTION
2 REPLIES 2
japelin
Rhodochrosite | Level 12

Thank you!

Your code works well!

 

I didn't know filename option.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 869 views
  • 1 like
  • 2 in conversation