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

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

1 ACCEPTED SOLUTION

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

Yep, as a good rule for using computers - never put special characters, spaces, tabs or anything other than alphanumeric characters in a filename. 

View solution in original post

6 REPLIES 6
art297
Opal | Level 21

My initial guess is that the file was open when you tried to import it.

 

Art, CEO, AnalystFinder.com

 

art297
Opal | Level 21

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

 

Reeza
Super User

The file is in the data set list? 

 

 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

hhchenfx
Barite | Level 11

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

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yep, as a good rule for using computers - never put special characters, spaces, tabs or anything other than alphanumeric characters in a filename. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 6 replies
  • 3383 views
  • 3 likes
  • 4 in conversation