Please post your full log 🙂
Hi Draycut,
This is what appears in the log in full after I try to run:
202 PROC MEANS DATA=merge.FullData2;
203 VAR C_PQLpTot;
204 RUN;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 423 observations read from the data set MERGE.FULLDATA2.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
I bet there is an error message in red in your log as well?
Unfortunately not - usually it will say something that directs me to the problem area but I just get the one error message. Here is part of the log from my previous coding to give a bit more context (the first part is the reverse coding I talked about, and it worked fine):
357
358 DATA merge.FullData2;
359 SET merge.FullData2;
360 ARRAY new (3) C_PedsQLC_P01 - C_PedsQLC_P03;
361 ARRAY old (3) C_PedsQLC_P1 - C_PedsQLC_P3;
362 Do i=1 to 3;
363 if old(i)=0 then new(i)=100;
364 else if old(i)=1 then new(i)=75;
365 else if old(i)=2 then new(i)=50;
366 else if old(i)=3 then new(i)=25;
367 else if old(i)=4 then new(i)=0;
368 end;
369 drop i;
370 C_PQLpNum = N(of C_PedsQLC_P01 C_PedsQLC_P02 C_PedsQLC_P03);
371 If C_PQLpNum GE 2 then C_PQLpTot = sum(C_PedsQLC_P01,C_PedsQLC_P02,C_PedsQLC_P03)/C_PQLpNum;
372 RUN;
NOTE: There were 423 observations read from the data set MERGE.FULLDATA2.
NOTE: The data set MERGE.FULLDATA2 has 423 observations and 261 variables.
NOTE: DATA statement used (Total process time):
real time 0.05 seconds
cpu time 0.03 seconds
373
374 /*Coding for MASC-10*/
375 PROC MEANS DATA=merge.FullData2;
376 VAR C_PQLpTot;
377 RUN;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 423 observations read from the data set MERGE.FULLDATA2.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
358 DATA merge.FullData2;
359 SET merge.FullData2;
You shouldn't code like that, it's a good way to destroy your data.
PROC MEANS should run. After the data step, but before PROC MEANS can you add a proc contents and show the output?
As I said, I'm a new SAS user. I've changed the coding throughout so that SET statements create a new data set that is a modified version of the data set in the DATA statement.
I ran PROC contents (see bolded section):
DATA merge.FullData6;
SET merge.FullData5;
ARRAY new (3) C_PedsQLC_P01 - C_PedsQLC_P03;
ARRAY old (3) C_PedsQLC_P1 - C_PedsQLC_P3;
Do i=1 to 3;
if old(i)=0 then new(i)=100;
else if old(i)=1 then new(i)=75;
else if old(i)=2 then new(i)=50;
else if old(i)=3 then new(i)=25;
else if old(i)=4 then new(i)=0;
end;
drop i;
C_PQLpNum = N(of C_PedsQLC_P01 C_PedsQLC_P02 C_PedsQLC_P03);
If C_PQLpNum GE 2 then C_PQLpTot = sum(C_PedsQLC_P01,C_PedsQLC_P02,C_PedsQLC_P03)/C_PQLpNum;
RUN;
PROC CONTENTS DATA=merge.FullData6;
RUN;
PROC MEANS DATA=merge.FullData6;
VAR C_PQLpTot;
RUN;
And received this error (again, see bold):
169
170 PROC CONTENTS DATA=merge.FullData6;
171 RUN;
ERROR: Unable to restore 'Base.Contents.Attributes' from template store!
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
NOTE: The SAS System stopped processing this step because of errors.
172
173 PROC MEANS DATA=merge.FullData6;
174 VAR C_PQLpTot;
175 RUN;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 423 observations read from the data set MERGE.FULLDATA6.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
You seem to have some other issues. have you tried restarting your computer and SAS?
If not, you may need to check if your installation is correct, something has clearly messed up your settings.
Not sure if this will affect it, but call you library anything other than SAS reserved words, in this case "merge" is a reserved word. This is very bad form, and can cause issues all over the place. So call you library something else then try it (probably best in a new session) and see if that changes it. Also please avoid coding ALL IN CAPITALS (or mixed case), as it makes code hard to read.
Sounds like you are having trouble with ODS. Can you produce any output? Can run the PROC MEANS with the NOPRINT option and OUTPUT statement so that are not generating any printed output and instead are just generating a new dataset.
Your SASUSER profile might be locked or corrupted.
Your WORK directory might be full.
Or worse something might be messed up with the SAS installation that is causing the error about the ODS template.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.