04-04-2015 12:24 AM
I am a very beginner of a SAS self learner. I have used libname to define the Practice library in SAS studio and tried to read a txt file saved in drive E: with following statements. However I got the error message as below:
%let path=E:\SAS\DA practice data - Original
infile "&path/b_sales.txt" dlm=' ';
input purchase age gender $ income $;
ERROR 180-322: Statement is not valid or it is used out of proper order
Anyone could help me explain what's wrong and how I can correct it?
Thank you very much!
04-04-2015 01:54 AM
Your %LET statement appears to be missing a semicolon. This means that the first statement in your program is:
%let path=E:\SAS\DA practice data - Original data Practice.b_sales;
I suspect it is your INFILE statement that is getting the 180 error as it doesn't have a preceding DATA statement as it has become part of the text in your %LET statement.
Need further help from the community? Please ask a new question.