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.
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.
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.