Hi,
I'm new to using PROC TEMPLATE. I think that I should have a template store called SASUSER.TEMPLAT, but I don't. I have the SASUSER library, but I don't see the TEMPLAT store anywhere in it.
Thank you,
John
Hi
ODS writes to the first update-able template store. So either of these should write your template to SASUSER.TEMPLAT if you have not messed with or redefined the path then this program should create both templates in SASUSER.TEMPLAT:
ods path show;
proc template;
define style styles.wombat;
parent=styles.htmlblue;
class Header /
color=pink
backgroundcolor=purple;
end;
run;
ods html file='c:\temp\usewombat.html' style=styles.wombat;
proc print data=sashelp.class(obs=2);
run;
ods html close;
proc template;
define style styles.koala / store=sasuser.templat;
parent=styles.htmlblue;
class Header /
color=navy
backgroundcolor=yellow;
end;
run;
ods html file='c:\temp\usekoala.html' style=styles.koala;
proc print data=sashelp.class(obs=2);
run;
ods html close;
cynthia
Here's the log:
The Explorer doesn't show the template repositories.
In Base SAS if you right click on the Results header in the explorer you will see a Templates menu item.
Hi ballardw,
When I'm in the Templates explorer window, I see the SASHELP.TMPLMST store, but the SASUSER.TEMPLAT store does not appear. Does this simply mean that there are no templates in SASUSER.TEMPLAT yet?
When I type in:
ods path show;
Here are the results:
Current ODS PATH list is:
1. SASUSER.TEMPLAT(UPDATE)
2. SASHELP.TMPLMST(READ)
I do not want to change the READ status of SASHELP.TMPLMST because I do not want to obliterate all the templates in it by writing to it. Do I have to create a template and place it into SASUSER.TEMPLAT? If so, how would I do that?
John
You can create your templates in any library though if you are going to modify one from SASHELP it is not a good idea to overwrite it, make a copy in your preferred library. The status you show indicates that any created templates should go to sasuser unless you specify otherwise.
I suspect you may be correct that if there are no templates then it doesn't show. But I've had custome styles in sasuser.templat for so long I don't remember ever checking before they were there.
Hi
ODS writes to the first update-able template store. So either of these should write your template to SASUSER.TEMPLAT if you have not messed with or redefined the path then this program should create both templates in SASUSER.TEMPLAT:
ods path show;
proc template;
define style styles.wombat;
parent=styles.htmlblue;
class Header /
color=pink
backgroundcolor=purple;
end;
run;
ods html file='c:\temp\usewombat.html' style=styles.wombat;
proc print data=sashelp.class(obs=2);
run;
ods html close;
proc template;
define style styles.koala / store=sasuser.templat;
parent=styles.htmlblue;
class Header /
color=navy
backgroundcolor=yellow;
end;
run;
ods html file='c:\temp\usekoala.html' style=styles.koala;
proc print data=sashelp.class(obs=2);
run;
ods html close;
cynthia
Here's the log:
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.