DEAR SAS USERS,
PROC SORT DATA=randrandomsampleCLAIMS2;
BY YEAR;
RUN;
Proc freq data=randrandomsampleCLAIMS2;
BY YEAR;
tables claims*QUARTER /nocol nopercent norow;
output OUT=claimtypes N=freq;
Run;
I get "ERROR 73-322: Expecting an OUT." for the code above. There is an OUT in there. What's my error?
Thanks,
The syntax for creating an output data set in PROC FREQ is a little different:
Proc freq data=randrandomsampleCLAIMS2;
BY YEAR;
tables claims*QUARTER / noprint out=claimtypes;
Run;
It's easy enough to rename the variables if you want to.
The syntax for creating an output data set in PROC FREQ is a little different:
Proc freq data=randrandomsampleCLAIMS2;
BY YEAR;
tables claims*QUARTER / noprint out=claimtypes;
Run;
It's easy enough to rename the variables if you want to.
The syntax is different than proc means, but you're pretty close. The rest of the syntax are options but you don't get to rename the variable. What happens with the following code:
Proc freq data=randrandomsampleCLAIMS2;
BY YEAR;
tables claims*QUARTER /nocol nopercent norow;
output OUT=claimtypes N;
Run;
Thanks for the encouragement :-)) For some reason, this code didn't produce any output dataset. why is that? I also tried Astounding's and that produced a dataset. the difference between the two codes in minimal.
Without a log I can't say. According to SAS docs the code is correct.
I suspect that the error message comes from this combination:
It's true that the OUTPUT statement is added, but evidently PROC FREQ isn't smart enough to figure out that the combination is OK (no printed output, but using an OUTPUT statement). If you wanted to add an OUTPUT statement to save additional statistics, that ought to work.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.