Help using Base SAS procedures

Question ablout template location

Reply
Regular Contributor
Posts: 241

Question ablout template location

Hello everyone,

For the SAS code below,there is no problem to run it,but I can't find work.templat in work folder,where is it?

Thanks!

George

proc template;

  define style newblue / store=work.templat;

  parent=styles.htmlblue;

 

  class graph / attrpriority='none';

  class GraphData1 / markersymbol='EarthFilled'

                     contrastcolor=black

                     linestyle=2;

  class GraphData2 / markersymbol='EarthFilled'

                     contrastcolor=black

                     linestyle=1;

end;

run;

SAS Super FREQ
Posts: 8,868

Re: Question ablout template location

Posted in reply to GeorgeSAS

Hi:

  The name of the template store should be: template.sas7bitm -- but it will be in your WORK location. And, you won't see the template in your regular SAS Explorer window. You need a Template Browser window to see the template store. Or, you need to run PROC TEMPLATE. Are you seeing this in the log window:

NOTE: Overwriting existing template/link: Newblue

NOTE: STYLE 'Newblue' has been saved to: WORK.TEMPLAT

  

NOTE: PROCEDURE TEMPLATE used (Total process time):

      real time           0.00 seconds

      cpu time            0.03 seconds

If so, then you should be able to run this code to see the echo of the template in the SAS log:

   proc template;

      source newblue / store=work.templat;

   run;


 

I usually recommend an explicit ODS PATH statement so that I don't have to recreate the template in the WORK location. To pop open the Template Browser, you have to be inside a Windowing environment like Windows Display Manager (type odstemplate in the Windows command line). EG and SAS Studio won't show you the interactive Template Browser. But the code I posted should work in any SAS session.

cynthia

Regular Contributor
Posts: 241

Re: Question ablout template location

Posted in reply to Cynthia_sas

Thank you!

Regular Contributor
Posts: 241

Re: Question ablout template location

Posted in reply to Cynthia_sas

How to open the template browser window?

PROC Star
Posts: 7,487

Re: Question ablout template location

Posted in reply to GeorgeSAS

To quote from a 2009 paper that Cynthia wrote ( http://support.sas.com/resources/papers/proceedings09/227-2009.pdf ): To open the interactive window, you either enter the command 'odstemplates' in the SAS command area or you right-click on the word "Results" in the Results Window and select "Templates" from the drop-down menu to open the Template Browser.

SAS Super FREQ
Posts: 8,868

Re: Question ablout template location

Posted in reply to GeorgeSAS

Hi:

  To open a browser window, you MUST be in SAS Display Manager on Windows. You cannot do this in EG or SAS Studio. You need to type odstemplate in the Windows Display Manager command line. If your editor does NOT have a Windows command line, you need to use the PROC TEMPLATE code method to review your template stores and see source code.

  Please refer this paper for some additional code samples: http://support.sas.com/resources/papers/proceedings09/227-2009.pdf and page 2 shows what the template browser looks like vs a report.

  I was unable to attach a screen shot of where in the command line you type odstemplates, so when I can post again, I will. But, again, there is only an interactive template browser window in interactive SAS Display Manager (not in EG, not in SAS Studio).

cynthia


how_to_open_template_browser.jpg
Ask a Question
Discussion stats
  • 5 replies
  • 273 views
  • 6 likes
  • 3 in conversation