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

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

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:

both_templates_saved_sasuser.png

View solution in original post

4 REPLIES 4
ballardw
Super User

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.

JohnSAScom
Quartz | Level 8

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

ballardw
Super User

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.

Cynthia_sas
SAS Super FREQ

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:

both_templates_saved_sasuser.png

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

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