BookmarkSubscribeRSS Feed
AnnaWoolery
Calcite | Level 5

Hi there!

 

I'm working with a data set that has 573 observations and consists of 10 variables. In the code below, I'm trying to remove some of the elements from my output In the log, I'm getting a blue note that says, "NOTE: ODS statements in the SAS Studio environment may disable some output features." Will the approach (included below) I'm taking not work in SAS Studio?

 

* Step 2: Perform a Chi-Square Test and Save the Results *;
ODS TRACE ON;
PROC FREQ DATA = work.Analysis;
TABLES HypRelDeathInd * StateCd / NOPERCENT NOROW NOCUM CHISQ;
RUN;
ODS TRACE OFF;

ODS OUTPUT CrossTabFreqs = Rslt.StatePercents
(KEEP = StateCd HypRelDeathInd Frequency Colpercent
WHERE = (HypRelDeathInd = 1 AND MISSING(StateCd) = 0));

ODS OUTPUT ChiSq = WORK.ChiSqResults
(DROP = TABLE
WHERE = (Statistic = 'Chi Square'));

1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi: Other classmates have posted about this SAME issue. You all are making the SAME mistake. Please remember that the ODS OUTPUT statement must go BEFORE the PROC FREQ step, not AFTER. You need ODS to OUTPUT the data set from PROC FREQ while the procedure is running. Putting the ODS OUTPUT statement AFTER the PROC FREQ step will NOT work.
Cynthia

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1867 views
  • 1 like
  • 2 in conversation