DATA Step, Macro, Functions and more

ERROR 180-322: Statement is not valid or it is used out of proper order.

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

ERROR 180-322: Statement is not valid or it is used out of proper order.

Hi, I'm a beginner in SAS and have an excercise to read in data and then use the means to print analysis. But I get the error message "Statement is not valid or it is used out of proper order." My data table is [id, kon, lon, atid]

 19     K      7150      50
 26     K     12300     100
 12     K      6400      50
 10     K      5650      50
  9     K     17600     100
 11     K     16200     100
  3     K     12600     100
 16     K     16900     100
 25     K     13700     100
 22     K      9900     100
  6     K      8900      50
  7     K     10700     100
 24     K     13800     100
  8     K     13100     100
 17     K     15400     100
  2     K     14100     100
 18     K     16100     100
  4     K     19700     100
 15     K     11500     100

and the code is

data ekon;
	infile '/folders/myfolders/ekon-win.txt';
	input id kon $ lon atid; 
	run;

proc sort data=ekon; by kon id;	
	proc print data=ekon;
	run;

proc means data=ekon maxdec=0;
	var lon atid;
	class kon;
	title 'Means ekon';
	run;

 

SAS complaints about the line "var lon atid", what am I not seeing?

 


Accepted Solutions
Solution
‎12-20-2015 02:14 PM
New Contributor
Posts: 2

Re: ERROR 180-322: Statement is not valid or it is used out of proper order.

Glad to read that I haven't gotten blind Smiley Very Happy

 

I shifted arounf the code in the program and it now works! Thanks for the help Merry Xmas!

View solution in original post


All Replies
Trusted Advisor
Posts: 1,115

Re: ERROR 180-322: Statement is not valid or it is used out of proper order.

Hi Orongo,

Good news: There is no syntax error in the code you've posted.

I would simply resubmit this code. If the error still occurs, please post the log.

Solution
‎12-20-2015 02:14 PM
New Contributor
Posts: 2

Re: ERROR 180-322: Statement is not valid or it is used out of proper order.

Glad to read that I haven't gotten blind Smiley Very Happy

 

I shifted arounf the code in the program and it now works! Thanks for the help Merry Xmas!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 1583 views
  • 0 likes
  • 2 in conversation