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 Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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