BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SSTEAD
Obsidian | Level 7

ERROR: Could not restore template. Input buffer is corrupt, or some other problem has occurred.

ERROR: Unable to restore 'base.univariate.Graphics.Histogram' from template store!

This error just appeared. I am running 9.4 (TS1M5)

Here is the example program:

 

data Interviews;

preop = 1; output;

preop = 2; output;

preop = 3; output;

preop = 4; output;

preop = 4; output;

preop = 4; output;

preop = 4; output;

preop = 4; output;

preop = 5; output;

preop = 5; output;

run;

 

proc format;

value resp 1='Rare' 2='Occasional' 3='Typical' 4='Mostly' 5='Always';

run;

%let FillColor=VPAB; /* VLIGB */

proc univariate data=Interviews normal noprint;

histogram preop /

normal (noprint w=2 color=black)

midpoints=1 to 5 by 1 noframe

height=2.5 cfill=&FillColor;

inset n="N" (4.0)

mean="Mean" (4.1)

median="Median" (4.1)

/format=4.1 pos=nw height=3;

format Preop resp. ;

run;

 

I tried using: the following, which worked for a couple times, then stopped!!!!!!

proc printto log="c:\temp\temp_style.sas";
run;
proc template;
  source styles.listing;
run;
proc printto; run;

I am totally lost here. Help anyone?

Thank you.

Stan 

1 ACCEPTED SOLUTION

Accepted Solutions
SSTEAD
Obsidian | Level 7

Cynthia,

You were correct. I contacted SAS Tech Support. They recommended the following - which worked!

https://blogs.sas.com/content/sgf/2020/10/19/debugging-sasuser-issues-when-you-use-sas-software/

 

In my SASUSER folder, there was an existing template file. I renamed it and added the ods path as listed in Issue 1.

 

Now, the test program, and the actual program work fine.

Thanks for replying !

Stan

View solution in original post

4 REPLIES 4
ballardw
Super User

@SSTEAD wrote:

ERROR: Could not restore template. Input buffer is corrupt, or some other problem has occurred.

ERROR: Unable to restore 'base.univariate.Graphics.Histogram' from template store!

This error just appeared. I am running 9.4 (TS1M5)

Here is the example program:

 

data Interviews;

preop = 1; output;

preop = 2; output;

preop = 3; output;

preop = 4; output;

preop = 4; output;

preop = 4; output;

preop = 4; output;

preop = 4; output;

preop = 5; output;

preop = 5; output;

run;

 

proc format;

value resp 1='Rare' 2='Occasional' 3='Typical' 4='Mostly' 5='Always';

run;

%let FillColor=VPAB; /* VLIGB */

proc univariate data=Interviews normal noprint;

histogram preop /

normal (noprint w=2 color=black)

midpoints=1 to 5 by 1 noframe

height=2.5 cfill=&FillColor;

inset n="N" (4.0)

mean="Mean" (4.1)

median="Median" (4.1)

/format=4.1 pos=nw height=3;

format Preop resp. ;

run;

 

I tried using: the following, which worked for a couple times, then stopped!!!!!!

proc printto log="c:\temp\temp_style.sas";
run;
proc template;
  source styles.listing;
run;
proc printto; run;

I am totally lost here. Help anyone?

Thank you.

Stan 


Since your Proc printo should have written the results to an external file the only reason I see to rerun the code is that you have been modifying the Listing style definition. So, where is the other Proc Template code and what does the log from running that look like?

 

Hint: if you want to modify SAS supplied styles make a new one with the desired one as a Parent. Otherwise syntax issues may corrupt the SAS version until it doesn't work. Which seems to be the case here.

Do you have any other code referencing Proc Template?

SSTEAD
Obsidian | Level 7

Thank you so much for your reply. I am really confused.

I was not intending to modify the template, just use the standard template.

Where am I modifying the template?

 

When I run just the program I listed, I get the 2 ERROR messages.

Based upon a suggestion in a posting several years back regarding the error messages, I added the second code snippet.

If you just run data interviews step, the proc format and the proc univariate, why am I getting errors?

Enclosed is a screenshot of the log.

screenshot_160.png

Thank you again.

 

 

Cynthia_sas
SAS Super FREQ

Hi:

  Running in 9.4M5, I cannot replicate your ERROR message, as shown below:

Cynthia_sas_0-1604417803067.png

I get the default HTML output created from PROC UNIVARIATE.

 

Your error message is related to something being wrong with your template store. I think under these circumstances, you really need to work with Tech Support so they can determine which template store is having an issue. Your PROC PRINTTO code to dump STYLES.LISTING is not the issue and has no relevance to the template being used by PROC UNIVARIATE.

 

Cynthia

SSTEAD
Obsidian | Level 7

Cynthia,

You were correct. I contacted SAS Tech Support. They recommended the following - which worked!

https://blogs.sas.com/content/sgf/2020/10/19/debugging-sasuser-issues-when-you-use-sas-software/

 

In my SASUSER folder, there was an existing template file. I renamed it and added the ods path as listed in Issue 1.

 

Now, the test program, and the actual program work fine.

Thanks for replying !

Stan

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1928 views
  • 0 likes
  • 3 in conversation