<?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: Proc Template error when executing from Unix command line in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Template-error-when-executing-from-Unix-command-line/m-p/211819#M13990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Generally, in Enterprise Guide, you have write access to SASUSER.TEMPLAT, which is automatically available for writing templates. However, in a server configuration, it is possible that the way you invoke SAS from the command line is routing you to a configuration where the SASUSER library is not available for WRITE access. The ODS PATH statement allows you to declare a location for the changed template and then you can also use STORE= to direct the template to a specific location where you know you have write access (if for example, you have more than one template store with write access). For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname main '/user/bin/main/stuff';&lt;/P&gt;&lt;P&gt;libname bkup '/user/bin/bkup/morestuff';&lt;/P&gt;&lt;P&gt;ods path main.templat(update) bkup.templat(update) sashelp.tmplmst(read);&lt;/P&gt;&lt;P&gt;*** proc template code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*** other code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this instance, without STORE=, the changed template would get written to the MAIN.TEMPLAT item store because it is listed first in the list. But with STORE= and 2 write-able item stores in the path, then you could direct your changed template to BKUP.TEMPLAT, if you wanted. Most people only have the default to start with, which usually is:&lt;/P&gt;&lt;P&gt;sasuser.templat(update) sashelp.tmplmst(read) -- but if your server SAS doesn't allow you write access to SASUSER (which might happen because in batch mode, you really don't need SASUSER), then taking control with an ODS PATH statement might be required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, of course, you will probably have to work with someone to get a location with write access and get the folder name correct for the LIBNAME statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW,&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt; never&lt;/SPAN&gt;, ever, ever, ever, ever, ever, ever, &lt;SPAN style="text-decoration: underline;"&gt;ever&lt;/SPAN&gt;&lt;/STRONG&gt; define SASHELP.TMPLMST with any access other than READ -- you do &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;/SPAN&gt; want to clobber the SAS-defined templates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Mar 2015 15:35:48 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2015-03-27T15:35:48Z</dc:date>
    <item>
      <title>Proc Template error when executing from Unix command line</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Template-error-when-executing-from-Unix-command-line/m-p/211818#M13989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting am getting this error when I execute my code from unix command line,&amp;nbsp; It runs fine when executing in SAS Enterprise Guide.&amp;nbsp; How can I resolve this.&amp;nbsp; Our report all execute from the command line.&amp;nbsp; Thanks, Cindy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;74&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc template;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;475&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define style styles.XLsansPrinter;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;476 parent = styles.sansPrinter;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;477 style header from header /&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;478 font_face = "Arial, Helvetica"&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;479 font_size = 10pt&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;480 font_weight = bold&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;481 font_style = roman&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;482 foreground = cx000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;483 background = #99ccff&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;484 just = center&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;485 vjust = bottom;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;486 end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;ERROR: Template 'Styles.XLsansPrinter' was unable to write to template store!&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;487 run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;NOTE: PROCEDURE TEMPLATE used (Total process time):&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.02 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.02 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;WARNING: Errors were produced.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="ecxmsonormal" style="background: white;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: #444444;"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 14:15:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Template-error-when-executing-from-Unix-command-line/m-p/211818#M13989</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2015-03-27T14:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Template error when executing from Unix command line</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Template-error-when-executing-from-Unix-command-line/m-p/211819#M13990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Generally, in Enterprise Guide, you have write access to SASUSER.TEMPLAT, which is automatically available for writing templates. However, in a server configuration, it is possible that the way you invoke SAS from the command line is routing you to a configuration where the SASUSER library is not available for WRITE access. The ODS PATH statement allows you to declare a location for the changed template and then you can also use STORE= to direct the template to a specific location where you know you have write access (if for example, you have more than one template store with write access). For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname main '/user/bin/main/stuff';&lt;/P&gt;&lt;P&gt;libname bkup '/user/bin/bkup/morestuff';&lt;/P&gt;&lt;P&gt;ods path main.templat(update) bkup.templat(update) sashelp.tmplmst(read);&lt;/P&gt;&lt;P&gt;*** proc template code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*** other code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this instance, without STORE=, the changed template would get written to the MAIN.TEMPLAT item store because it is listed first in the list. But with STORE= and 2 write-able item stores in the path, then you could direct your changed template to BKUP.TEMPLAT, if you wanted. Most people only have the default to start with, which usually is:&lt;/P&gt;&lt;P&gt;sasuser.templat(update) sashelp.tmplmst(read) -- but if your server SAS doesn't allow you write access to SASUSER (which might happen because in batch mode, you really don't need SASUSER), then taking control with an ODS PATH statement might be required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, of course, you will probably have to work with someone to get a location with write access and get the folder name correct for the LIBNAME statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW,&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt; never&lt;/SPAN&gt;, ever, ever, ever, ever, ever, ever, &lt;SPAN style="text-decoration: underline;"&gt;ever&lt;/SPAN&gt;&lt;/STRONG&gt; define SASHELP.TMPLMST with any access other than READ -- you do &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;/SPAN&gt; want to clobber the SAS-defined templates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 15:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Template-error-when-executing-from-Unix-command-line/m-p/211819#M13990</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-03-27T15:35:48Z</dc:date>
    </item>
  </channel>
</rss>

