I am doing a macro import of data from excel and it has worked except for a specific set of data. This data is on my computer and the format of the data is the same as the rest so I do not know why only that data has that error. I have attached these pictures which are the macro code, the error message I get for the specific data, and an example of the successful macro import for my other data.
I would appreciate any suggestions on how to fix this error.
Show us the (trimmed if necessary) output from this:
filename DIR pipe 'dir "c:\fullpath" ';
data _null_;
infile DIR;
input;
putlog _infile_;
run;
Make sure that the file is there. When SAS says a file ain't there, it ain't there, period.
It also helps to have easily usable names for paths and files:
- no blanks
- no special characters (aside from letters, digits, underlines or dots)
Sometimes an inserted special character in a filename (like a tab) might disguise as a blank and cause confusion. So instead of blanks, always use underlines.
See Maxim 44.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.