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-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
  • 4 replies
  • 3325 views
  • 0 likes
  • 3 in conversation