Thanks for wasting everyone who wasted their precious time looking at this post.
I am a starter of SAS Studio user.
I have faced the issue that the below picture had shown.
At first, I have thought it might be my dataset in CSV problems, then I go try it with other CSV files that it can work in earlier time, and it still shows this error... Please tell me what should I do to solve this...
Once again, highly appreciated all the help given.
Reading the log may enlighten you.
Have you read the csv-file by using a data step or by proc import? Was the step successful?
Please post the log using the "insert code" button ... you can't read an excel-file using a data step, please note that there is a huge difference between xlsx and csv, the later is a proper file-format to store data, the other is, well, crap.
Please post the log of the step that reads the csv file. Post the complete log (code and messages). If lots of "Invalid data" messages appear, a few are sufficient so as to not clog up your post.
Use this button to paste the log contents into your post:
PROC IMPORT FILE="/home/u58811045/Assignment.csv" OUT=WORK.ASSIGNMENT2 DBMS=CSV replace; RUN;
data work.assignment; infile "/home/u58811045/Assignment.csv" delimiter = "," missover dsd firstobs=2; informat id best32. ; informat name $37. ; informat host_id best32. ; informat host_name $9. ; informat neighbourhood_group $14. ; informat neighbourhood $12. ; informat latitude best32. ; informat longitude best32. ; informat room_type $15. ; informat price best32. ; informat minimum_nights best32. ; informat number_of_reviews best32. ; informat last_review mmddyy10. ; informat reviews_per_month best32. ; informat calculated_host_listings_count best32. ; informat availability_365 best32. ; format id best12. ; format name $37. ; format host_id best12. ; format host_name $9. ; format neighbourhood_group $14. ; format neighbourhood $12. ; format latitude best12. ; format longitude best12. ; format room_type $15. ; format price best12. ; format minimum_nights best12. ; format number_of_reviews best12. ; format last_review mmddyy10. ; format reviews_per_month best12. ; format calculated_host_listings_count best12. ; format availability_365 best12. ; input id name $ host_id host_name $ neighbourhood_group $ neighbourhood $ latitude longitude room_type $ price minimum_nights number_of_reviews last_review reviews_per_month calculated_host_listings_count availability_365; run;
But when i do this:
DATA work.assignment; RUN;
It shows the same error again.
This
DATA work.assignment;
RUN;
will always create a totally void dataset; no variables, no observations.
Why? Because you did not tell the data step to read anything (via INFILE/INPUT or a SET, MERGE or UPDATE statement), or to create anything from scratch (by setting variable(s) to value(s), and using OUTPUT).
If a dataset WORK.ASSIGNMENT existed, with data in it, this step will overwrite it with no data.
PS Look at the log of just this step, and you will see it yourself. That's why there is a Maxim 2.
PPS and this also illustrates why it is so important to post code and log. Had you included this snippet in your initial post, the solution would have been obvious right there.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.