BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tan2
Calcite | Level 5
I am a new SAS user and have spent a large amount of time on a problem that I think has a simple explanation. I'm wondering if anyone has any ideas I can explore.
 
I am trying to run a (very simple!) PROC MEANS procedure:
 
PROC MEANS DATA=merge.FullData2;
VAR C_PQLpTot;
RUN;
 
And I get this message:
 
NOTE: The SAS System stopped processing this step because of errors.
 
C_PQLpTot is a new variable I created that sums survey scores from the original imported data. Subjects answered three questions using a score of 0-4 and I applied code to transform 0-4 (0=100; 1=75; 2=50; 3=25; and 4=0) and then average their responses for a score between 0-100.
 
I have tried running PROC MEANS on different numeric variables in my dataset (both newly created variables and variables that were imported with the original data set) and get the same error.  
 
I am sure there is a simple fix for this because it is so straightforward, but I can't seem to figure it out! Thanks in advance for your help.
 
 
 
1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User
Are you modifying the search paths for templates in your code? Have you actually been creating you own templates for ODS?
Open a ticket with SAS support. They should be the best place to get detailed support. They can work with you on what to test and probably will be able to fix it without a full install.

View solution in original post

16 REPLIES 16
PeterClemmensen
Tourmaline | Level 20

Please post your full log 🙂

Tan2
Calcite | Level 5

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

PeterClemmensen
Tourmaline | Level 20

I bet there is an error message in red in your log as well?

Tan2
Calcite | Level 5

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

 

Reeza
Super User

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?

Tan2
Calcite | Level 5

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

 

 

Reeza
Super User

 

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.

 

Tan2
Calcite | Level 5
I have restarted my computer and SAS, same issue remains.
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

Tan2
Calcite | Level 5
Thank you - this is helpful going forward in any case. I replaced 'merge' with 'alldata' to avoid use of a reserved word and will avoid CAPS going forward. Unfortunately still having the same issue with my current coding after these changes.
Tom
Super User Tom
Super User

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.

Tan2
Calcite | Level 5
Thanks Tom. My work directory is not full and I have never seen any errors related to my SAS user profile. When I first started there was an error related to the ODS template (I can't remember what it was or how I fixed it at the time). I have tried everything else suggested here, so I am wondering if reinstallation of SAS would be the next step.
Tom
Super User Tom
Super User
Are you modifying the search paths for templates in your code? Have you actually been creating you own templates for ODS?
Open a ticket with SAS support. They should be the best place to get detailed support. They can work with you on what to test and probably will be able to fix it without a full install.
Tan2
Calcite | Level 5
Okay - thank you. I haven't modified any paths or created any templates. I'll open a ticket and go from there. Thanks again for your help!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 16 replies
  • 2698 views
  • 0 likes
  • 5 in conversation