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

A few days ago I came across a program to modify the crosstabs template and tried it as follows:

 

proc template;
define crosstabs Base.Freq.CrossTabFreqs;
cellvalue frequency percent rowpercent colpercent;
define frequency;
format=8.;
header='Count';
end;
define percent;
format=pctfmt.;
header='Overall %';
end;
define rowpercent;
format=pctfmt.;
header='Row %';
end;
define colpercent;
format=pctfmt.;
header='Col %';
end;
end;
run;

 

It worked but as I wanted to go back, the source I read unfortunately didn't instruct clearly how to switch to default template. Since then I've been using this:

 

ods path sashelp.tmplmst(read) sasuser.templat(update);

 

to go back to default template. If I don't run that ods, the modified template will show up.

My question is: How can I remove the modified template permanently?

I find a program on SAS User's Guide page to delete the entire SASUSER.Templat store of customized templates, not sure if it can solve my problem.

 

ods path sashelp.tmplmst(read);
proc datasets library=sasuser nolist;
   delete templat(memtype=itemstor);
run;
ods path sasuser.templat(update) sashelp.tmplmst(read);
1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

If you goto Results  (in SAS that is), and right click on the word Results in the Results window, you will see a Templates option on the menu.  This will give you a tree view of the libraries and templates within them, you can add or remove from there.  I would caution you to be careful with thetemplates, I would always create a library for them separate to your code - principally as they may be used by more than one person which is one of the reasons for them.  Then put your templates in there and load them within your autoexec.sas.  

View solution in original post

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

If you goto Results  (in SAS that is), and right click on the word Results in the Results window, you will see a Templates option on the menu.  This will give you a tree view of the libraries and templates within them, you can add or remove from there.  I would caution you to be careful with thetemplates, I would always create a library for them separate to your code - principally as they may be used by more than one person which is one of the reasons for them.  Then put your templates in there and load them within your autoexec.sas.  

NonSleeper
Quartz | Level 8

The screen shot below is what I find on the template menu of SAS Results. It looks like the customized template is stored on Sasuser.Templat => Base => Freq => CrossTabFreqs

 

So I guess I need to delete that customized template to go back to default template, is that correct? Will the deletion be the CrossTabFreqs only, or the whole folders Base and/or Freq? I've come across warnings when manipulating on templates so just want to be sure. I think I will avoid messing with this stuff for a while.

 

UPDATE: I deleted CrossTabFreqs and things look fine now.

 

Template.png

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

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
  • 2 replies
  • 3022 views
  • 1 like
  • 2 in conversation