The code is working now for all variables and the whole files! thank you so much 🙂
The only warning is this : WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.
That implies that you have errors still....but if you're happy.
Please mark the question as answered 🙂
And feel free to move towards, reading all files in now 🙂
No...that warning is tied to another warning. It basically means it ran into the same error over and over so stopped warning you about it.
There sould be other Warning in the logs.
I understand. All I see in the log is a series of "Invalid data for variable .. in line ....." for different variables and different lines.
But when I check my raw data (csv file), I don't see anything specical or wrong with the input data!!
Its not necessarily an issue with the csv data, its an issue with how SAS is trying to read the data, and a mismatch between the CSV and what ends up in the SAS dataset. It's identifying the variable so you can narrow it down and see what the issue is. The error is usually fairly explicit in identifying the cause.
I'd strongly recommend fixing these before moving on.
SAS is telling you it did not find what it expected in a field.
It tells you the variables that you should be looking at in the ERROR. I don't know what's causing your errors.
What's with all the exclamation marks in your writing?
I see. Trying to find the cause of warning .. thank you for your time and help.
The exclamation marks are for clarity of my writing and points I would like to mention.
I'll refer you to the first and last paragraph in this blog post. I suppose it's up to you if this is considered a professional setting.
https://purduecco.wordpress.com/2012/02/07/overused-exclamation-points/
Though I'm sure I have my own idiosyncracies that are annoying to others. ALLCAPS most likely 😉
So you try to teach grammar besides SAS? haha 🙂
I think its a good article: http://popchassid.com/americas-obsession-grammar-means
Thanks for your comment though 🙂
I'm not American 😉
If you have your data in an XLSX file then you should be able to read it directly. You do have to be careful with Excel files as they are SPREADSHEETS and not DATABASES. So the user can put anytype of information into any cell, whereas a SAS dataset requires that a single column (variable) is of a constant data type.
libname myfile xlsx 'sample1.xlsx';
proc copy inlib=myfile outlib=work;
run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.