<?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 — How to undo the edits? Part 2 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-TEMPLATE-How-to-undo-the-edits-Part-2/m-p/864672#M341446</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Assuming you did NOT write into SASHELP.TMPLMST, then before you run your code, you should ONLY need to do this:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ods path sashelp.tmplmst(read);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do NOT put SASUSER.TEMPLAT into this path. What you're doing is removing the SASUSER item store from being searched when you use PROC FREQ. Assuming you only changed the template in SASUSER, then you should get the production PROC FREQ template with this statement in your code because you are telling ODS to ONLY search in SASHELP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Let's keep our fingers crossed that you did NOT change SASHELP.TMPLMST, and when you use the ODS PATH statement, your PROC FREQ will be the default template. So then, when you want to use your changed template, you'd have to issue a new ODS PATH:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ods path sasuser.templat(update) sashelp.tmplmst(read);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Which should then cause the changed FREQ template to be found first. What you're doing with the ODS PATH statement is changing what is available to be searched for&amp;nbsp; by ODS based on the templates used by the different procedures.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; Now in the worst of cases, when you change the path to just SASHELP.TMPLMST and you do (unfortunately) still see the changed rejport, then you are sort of in Tech Support land. You should never, never, never, never, never, never, never, never, ever change SASHELP.TMPLMST to any access other than (READ). Depending on your platform, Tech Support may be able to just send you a copy of the item store for your version and maintenance level of SAS. In the ugly old days, if you accidentally wrote over a template in SASHELP.TMPLMST, you had to reinstall SAS to get the production templates back (guess how I know this). I don't think it's that way anymore, but I'm sending all good thoughts your way, that you only changed SASUSER.TEMPLAT.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Cynthia&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Mar 2023 20:19:20 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2023-03-16T20:19:20Z</dc:date>
    <item>
      <title>PROC TEMPLATE — How to undo the edits? Part 2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TEMPLATE-How-to-undo-the-edits-Part-2/m-p/864506#M341407</link>
      <description>&lt;P&gt;Way back in the Pleistocene era, &lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-TEMPLATE-how-to-un-do-edits/m-p/851968" target="_self"&gt;I asked the question&lt;/A&gt; about changing formatting via PROC TEMPLATE and then later undo-ing the changes.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;&amp;nbsp;provided a useful response regarding using ODS PATH.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, it now seems as if I have made the change permanent, unknowingly. If I launch a new SAS session and issue the command&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods path show;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see that the path is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1. SASUSER.TEMPLAT(UPDATE)
2. SASHELP.TMPLMST(READ)
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which agrees with what the default ODS PATH is according to&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/odsug/p03q7l9284sg38n1d9186k3i7u3c.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmmvacdc/9.4/odsug/p03q7l9284sg38n1d9186k3i7u3c.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if I run a simple PROC FREQ, I see that my changes using PROC TEMPLATE are still in effect (highlighted in yellow), remember this is a brand new SAS session. Output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1678969829778.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81628i78D93126270BA43D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaigeMiller_0-1678969829778.png" alt="PaigeMiller_0-1678969829778.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not what I want. How do I un-do this change and make it permanent? I add that if I start the brand new SAS session with &lt;FONT face="courier new,courier"&gt;ODS PATH RESET;&lt;/FONT&gt; it doesn't seem to fix the problem.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 12:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TEMPLATE-How-to-undo-the-edits-Part-2/m-p/864506#M341407</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-03-16T12:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TEMPLATE — How to undo the edits? Part 2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TEMPLATE-How-to-undo-the-edits-Part-2/m-p/864672#M341446</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Assuming you did NOT write into SASHELP.TMPLMST, then before you run your code, you should ONLY need to do this:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ods path sashelp.tmplmst(read);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do NOT put SASUSER.TEMPLAT into this path. What you're doing is removing the SASUSER item store from being searched when you use PROC FREQ. Assuming you only changed the template in SASUSER, then you should get the production PROC FREQ template with this statement in your code because you are telling ODS to ONLY search in SASHELP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Let's keep our fingers crossed that you did NOT change SASHELP.TMPLMST, and when you use the ODS PATH statement, your PROC FREQ will be the default template. So then, when you want to use your changed template, you'd have to issue a new ODS PATH:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ods path sasuser.templat(update) sashelp.tmplmst(read);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Which should then cause the changed FREQ template to be found first. What you're doing with the ODS PATH statement is changing what is available to be searched for&amp;nbsp; by ODS based on the templates used by the different procedures.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; Now in the worst of cases, when you change the path to just SASHELP.TMPLMST and you do (unfortunately) still see the changed rejport, then you are sort of in Tech Support land. You should never, never, never, never, never, never, never, never, ever change SASHELP.TMPLMST to any access other than (READ). Depending on your platform, Tech Support may be able to just send you a copy of the item store for your version and maintenance level of SAS. In the ugly old days, if you accidentally wrote over a template in SASHELP.TMPLMST, you had to reinstall SAS to get the production templates back (guess how I know this). I don't think it's that way anymore, but I'm sending all good thoughts your way, that you only changed SASUSER.TEMPLAT.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Cynthia&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 20:19:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TEMPLATE-How-to-undo-the-edits-Part-2/m-p/864672#M341446</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-03-16T20:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TEMPLATE — How to undo the edits? Part 2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TEMPLATE-How-to-undo-the-edits-Part-2/m-p/864789#M341486</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have done a text search of every SAS program I have written on this job to find places where I used &lt;FONT face="courier new,courier"&gt;ods path&lt;/FONT&gt; and I see no such place where I changed the access mode on&amp;nbsp;&lt;SPAN&gt;SASHELP.TMPLMST to update or write. So that's good. Could I have accidentally made such a change and then modified the code back to read access mode before saving the code? I guess we will never know.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I do see examples in my code where I changed either WORK.TEMPLAT or PUB.TEMPLAT (where PUB is a valid LIBNAME) to update or write access mode, I assume that is not the potential cause of any of this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;However, I can confirm that this seems to eliminate the problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Assuming you did NOT write into SASHELP.TMPLMST, then before you run your code, you should ONLY need to do this:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;ods path sashelp.tmplmst(read);&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Brief testing indicates that I need to do this each time I launch SAS, so I will put this into my AUTOEXEC, and be much more careful whenever I change templates. (Unless there is something else that will work so I don't have to put this into my autoexec...)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 10:56:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TEMPLATE-How-to-undo-the-edits-Part-2/m-p/864789#M341486</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-03-17T10:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TEMPLATE — How to undo the edits? Part 2</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TEMPLATE-How-to-undo-the-edits-Part-2/m-p/864916#M341532</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;By default, when the system starts up, SASUSER.TEMPLAT and SASHELP.TMPLMST are set up by default. Theoretically, if you list SASHELP.TMPLMST first in the ODS PATH statement, that is the item store that is searched first. And if the production PROC FREQ template is found there, then that should stop the search there, even if SASUSER.TEMPLAT is in the list. My tendency is to NOT dump changed templates in SASUSER because every time you install SAS your SASUSER gets re-created, thus losing everything you saved there. Typically, I store templates in WORK while I'm testing and then send them to a permanent library that is not SASUSER (something like your PUB library). Putting the ODS PATH in your AUTOEXEC is a good way of dealing with the need to bump SASUSER.TEMPLAT out of the search path. You could try:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;ods path sashelp.tmplmst(read) sasuser.templat(update);&lt;/STRONG&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; This approach works well for changed style templates that have different names than the production style templates. But the issue with the SASUSER that is the other reason I don't use it is that you don't want to give EVERYONE who will be using the changed template the code so they can each store the template in their SASUSER. Far better to put your production templates in your permanent library that's accessible to everyone and then the&amp;nbsp; the SAS production ones will be in&amp;nbsp; SASHELP and then for most people who will be sharing your templates, I'd recommend something like THIS in everybody's autoexec:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;ods path sashelp.tmplmst(read) myprod.templat(read);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;In other words, make the access level read for everyone except the programmers who will be allowed to change it.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 16:19:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TEMPLATE-How-to-undo-the-edits-Part-2/m-p/864916#M341532</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-03-17T16:19:51Z</dc:date>
    </item>
  </channel>
</rss>

