proc freq data=rawdata noprint;
table year_cat * A--P / trend norow nocol nopercent out=Output_of_trend;
run;
Dear all,
I have a code as written above. I would like to produce the count result of all the variables from A to P such that it all gets to store in output year_cat dataset. Is there any direct ODS option or any other method in sas to avail that.
under year-cat column i have multiple year categories like (2010-2012), (2013-2014), (2015-2018), (2019-2020)...... and multiple columns like A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P . So i have used A--P. But when i run the code it only captures results produced from year_cat*P in my output dataset where as in the result window it captures for all the variables from A to P.
Kindly share if any one knows any shortcut way by ODS or any other options
Hello @sahoositaram555,
The ODS output datasets will contain the information from all tables year_cat * A, ..., year_cat * P.
ods select none;
ods output crosstabfreqs=freqs(drop=_table_ percent rowpercent colpercent)
trendtest=trendtests;
proc freq data=rawdata;
table year_cat * A--P / trend;
run;
ods select all;
Hello @sahoositaram555,
The ODS output datasets will contain the information from all tables year_cat * A, ..., year_cat * P.
ods select none;
ods output crosstabfreqs=freqs(drop=_table_ percent rowpercent colpercent)
trendtest=trendtests;
proc freq data=rawdata;
table year_cat * A--P / trend;
run;
ods select all;
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 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.