<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ODS, proc template style in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72423#M8265</link>
    <description>Thanks David.  When I try that syntax I get this error.&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Template 'Styles.Dashboard' was unable to write to template store!</description>
    <pubDate>Mon, 21 Sep 2009 18:22:24 GMT</pubDate>
    <dc:creator>Smitty</dc:creator>
    <dc:date>2009-09-21T18:22:24Z</dc:date>
    <item>
      <title>ODS, proc template style</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72421#M8263</link>
      <description>I am trying to create and use a style with the following ODS in an scl web app.  When I use the following code I get the error message that style cannot be found.  The log shows the style is being saved.  Can you please explain where I am going wrong?&lt;BR /&gt;
&lt;BR /&gt;
submit continue;&lt;BR /&gt;
      proc template;&lt;BR /&gt;
         define style dashboard / store=styles;&lt;BR /&gt;
            parent=styles.minimal;&lt;BR /&gt;
            style header_blue_center /&lt;BR /&gt;
               background = cx7ACAFF&lt;BR /&gt;
               font = ("Arial",8pt,Bold)&lt;BR /&gt;
               foreground = cx000000&lt;BR /&gt;
               just = C&lt;BR /&gt;
               frame = box;&lt;BR /&gt;
         end;&lt;BR /&gt;
      run;&lt;BR /&gt;
      quit;&lt;BR /&gt;
&lt;BR /&gt;
      ods escapechar = '~';&lt;BR /&gt;
      options nonumber;&lt;BR /&gt;
      %let RV=%sysfunc(appsrv_header(Content-type, application/vnd.ms-excel));&lt;BR /&gt;
      %let RV=%sysfunc(appsrv_header(Content-disposition, %str(attachment; filename=temp.xls)));&lt;BR /&gt;
      ods html body=_webout style=styles.dashboard;&lt;BR /&gt;
      proc report data=work.exceldata;&lt;BR /&gt;
         define short    / display "Short Study Number"&lt;BR /&gt;
            style(column)=header_blue_center&lt;BR /&gt;
            style(header)=header_blue_center;&lt;BR /&gt;
      run;&lt;BR /&gt;
   endsubmit;</description>
      <pubDate>Mon, 21 Sep 2009 17:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72421#M8263</guid>
      <dc:creator>Smitty</dc:creator>
      <dc:date>2009-09-21T17:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: ODS, proc template style</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72422#M8264</link>
      <description>Try this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
define style styles.dashboard;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
instead of:&lt;BR /&gt;
[pre]&lt;BR /&gt;
define style dashboard / store=styles;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
-- David Kelley, SAS</description>
      <pubDate>Mon, 21 Sep 2009 18:12:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72422#M8264</guid>
      <dc:creator>David_SAS</dc:creator>
      <dc:date>2009-09-21T18:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: ODS, proc template style</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72423#M8265</link>
      <description>Thanks David.  When I try that syntax I get this error.&lt;BR /&gt;
&lt;BR /&gt;
ERROR: Template 'Styles.Dashboard' was unable to write to template store!</description>
      <pubDate>Mon, 21 Sep 2009 18:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72423#M8265</guid>
      <dc:creator>Smitty</dc:creator>
      <dc:date>2009-09-21T18:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: ODS, proc template style</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72424#M8266</link>
      <description>I believe that you need to check your ODS PATH settings.  ODS PATH needs to define a writable template itemstore so that PROC TEMPLATE can store your template definition.&lt;BR /&gt;
&lt;BR /&gt;
Typically the first itemstore in the ODS PATH is SASUSER.TEMPLAT, and typically it's writable.  &lt;BR /&gt;
&lt;BR /&gt;
You can check the ODS PATH by executing:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods path show;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
-- David Kelley, SAS</description>
      <pubDate>Mon, 21 Sep 2009 19:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72424#M8266</guid>
      <dc:creator>David_SAS</dc:creator>
      <dc:date>2009-09-21T19:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: ODS, proc template style</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72425#M8267</link>
      <description>Hi:&lt;BR /&gt;
  Just a few comments to add to what David said. Are you using either SAS/IntrNet and an SCL program or a SAS Stored Process (calling an SCL program)?&lt;BR /&gt;
 &lt;BR /&gt;
  If so, you may find that your updated style template needs to be written to an item store or template store that "lives" on a server that is accessible to your platform configuration (SAS/IntrNet Application Server or Stored Process Server). (In other words, you cannot write the updated template to your personal C: drive.)&lt;BR /&gt;
&lt;BR /&gt;
  Next, if you are trying to open your result file with Excel (as indicated by your appsrv_header function), you may find that ODS HTML does not work as well as ODS HTML3. It turns out that ODS HTML in SAS 9 creates HTML 4.01 compliant tags and Excel is much happier with HTML 3.2 compliant tags. You may want to invoke ODS HTML3 instead of ODS HTML in your invocation code.&lt;BR /&gt;
 &lt;BR /&gt;
Finally to reiterate what David said, you need to control your new template location with a libname and an ODS PATH statement. Something like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
libname mytemp 'server-path-location-for-changed-templates';&lt;BR /&gt;
                      &lt;BR /&gt;
ods path mytemp.templat(update)&lt;BR /&gt;
         sasuser.templat(update)&lt;BR /&gt;
         sashelp.tmplmst(read);&lt;BR /&gt;
             &lt;BR /&gt;
proc template;&lt;BR /&gt;
   define style styles.dashboard / store=mytemp.templat;&lt;BR /&gt;
...&lt;BR /&gt;
   end;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
With this code, a folder or directory named "styles" will be created in the item store "mytemp.templat". Inside the "styles" folder, you will be creating a new style template called "dashboard". However, you will only want to write to mytemp.templat when you are creating or updating your new template. (Probably 1 time) Most of the time, when running jobs, you will just need to POINT to the new item store on the server like this: &lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
libname mytemp 'server-path-location-for-changed-templates';&lt;BR /&gt;
                      &lt;BR /&gt;
ods path mytemp.templat(read)&lt;BR /&gt;
         sasuser.templat(read)&lt;BR /&gt;
         sashelp.tmplmst(read);&lt;BR /&gt;
             &lt;BR /&gt;
ods escapechar = '~';&lt;BR /&gt;
options nonumber;&lt;BR /&gt;
%let RV=%sysfunc(appsrv_header(Content-type, application/vnd.ms-excel));&lt;BR /&gt;
%let RV=%sysfunc(appsrv_header(Content-disposition, %str(attachment; filename=temp.xls)));&lt;BR /&gt;
                &lt;BR /&gt;
ods html3 file=_webout style=styles.dashboard;&lt;BR /&gt;
...more code...&lt;BR /&gt;
ods html3 close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
         &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 21 Sep 2009 23:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72425#M8267</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-09-21T23:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: ODS, proc template style</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72426#M8268</link>
      <description>You guys rock!  Your advice worked like a charm.  I utilized the save library and therefore did not need the libname statement.  Yes, I am using SAS/IntrNet and an SCL program.  Your suggestion regarding HTML3 also improved performance.&lt;BR /&gt;
&lt;BR /&gt;
Thank you!&lt;BR /&gt;
Smitty</description>
      <pubDate>Tue, 22 Sep 2009 11:03:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-proc-template-style/m-p/72426#M8268</guid>
      <dc:creator>Smitty</dc:creator>
      <dc:date>2009-09-22T11:03:59Z</dc:date>
    </item>
  </channel>
</rss>

