Hi Everyone,
I follow this below code to import all CSV file
https://github.com/statgeek/SAS-Tutorials/blob/master/Import_all_files_one_type
It works but I find a very strange issue.
1 of the datafile is not import even though the name of this file is in the list.
SAS create test1, test2, then test4. it totally skip to import that file (which supposed to be test3)
I rename the file, still not work.
I save as a new name, SAS import the new file but still refuse to import the old file.
I also try to run this file individually using no-macro code, it works
In log, there is no sign for this file being mentioned.
I wonder if you have any idea what is going on with that gosh file.
Thank you,
HC
Yep, as a good rule for using computers - never put special characters, spaces, tabs or anything other than alphanumeric characters in a filename.
My initial guess is that the file was open when you tried to import it.
Art, CEO, AnalystFinder.com
If that wasn't it, I'd first send the command:
options mprint mologic symbolgen;
and then run the macro
The carefully review the expanded log you'll receive
Art, CEO, AnalystFinder.com
The file is in the data set list?
Right, let me repeat for the hundreth time,
CSV is not Excel
CSV=Comma Separated Variable file, it is a text file file with a bit of structure to indicate where data starts/stops. It is nothing to do with Excel!
Now, for your question, as we cannot see the files, nor the run, please provide a log of the run, and if possible the dataset of list, what I suspect is the name for the dataset is not valid, so its not being written.
I guess the problem is that: the file name:
"Strk, Tiexrabc 8.3.17_Expense Reimbursement Form" contains a comma "," so SAS somehow doesnt read it.
I put "," in other file name and SAS skip it as well.
Please confirm if it is the right cause.
HC
Yep, as a good rule for using computers - never put special characters, spaces, tabs or anything other than alphanumeric characters in a filename.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.