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

Hi everybody,

I got this code

 

filename fnames pipe "dir /ds/data star/* /b";

data fnames;
  infile fnames pad missover;
  input @1 filename $255.;
run;

 

It reads all the files in the directory and create a dataset with one record for each file in the directory.


The problem is the blank in the middle of the name of the directory, data star.
If I remove this blank (and put datastar instead of data star, for example) is OK.
With it, it reads a not correct path, /ds/data.
I can't remove the blank in the directory name so could I do to obtain the correct path?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Its a matter of quoting:

filename fnames pipe 'dir "/ds/data star" /b';

Put single quotes around the string, and use double quotes around the network path.

View solution in original post

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Its a matter of quoting:

filename fnames pipe 'dir "/ds/data star" /b';

Put single quotes around the string, and use double quotes around the network path.

Illodolaio
Calcite | Level 5

Thanks !

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

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

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