Help using Base SAS procedures

PROC TEMPLATE: SASUSER.TEMPLAT Missing

Accepted Solution Solved
Reply
Contributor
Posts: 27
Accepted Solution

PROC TEMPLATE: SASUSER.TEMPLAT Missing

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

 

 


Accepted Solutions
Solution
‎07-14-2016 08:06 AM
SAS Super FREQ
Posts: 8,864

Re: PROC TEMPLATE: SASUSER.TEMPLAT Missing

Posted in reply to JohnSAScom

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


All Replies
Super User
Posts: 11,343

Re: PROC TEMPLATE: SASUSER.TEMPLAT Missing

Posted in reply to JohnSAScom

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.

Contributor
Posts: 27

Re: PROC TEMPLATE: SASUSER.TEMPLAT Missing

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

Super User
Posts: 11,343

Re: PROC TEMPLATE: SASUSER.TEMPLAT Missing

Posted in reply to JohnSAScom

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.

Solution
‎07-14-2016 08:06 AM
SAS Super FREQ
Posts: 8,864

Re: PROC TEMPLATE: SASUSER.TEMPLAT Missing

Posted in reply to JohnSAScom

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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