<?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: Help with Error: Insufficient authorization to access C:\Windows\system32\macros.tmp. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640654#M190885</link>
    <description>&lt;P&gt;Yes, that worked. Thank you so much.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Apr 2020 09:49:12 GMT</pubDate>
    <dc:creator>wbaker0621</dc:creator>
    <dc:date>2020-04-17T09:49:12Z</dc:date>
    <item>
      <title>Help with Error: Insufficient authorization to access C:\Windows\system32\macros.tmp.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640600#M190855</link>
      <description>&lt;P&gt;Greetings All, I am working through the "User’s Guide Customizing the Kaplan-Meier Survival Plot" text and trying to run the code to establish macros. The code below was taken straight from the text. When I run the code, I get an error: "Insufficient authorization to access C:\Windows\system32\macros.tmp." and I cannot figure out how to resolve it. Any and all advice is welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bill (novice, but learning SAS user)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
%let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/131;
infile "http:&amp;amp;url/templft.html" device=url;
file 'macros.tmp';
retain pre 0;
input;
if index(_infile_, '&amp;lt;/pre&amp;gt;') then pre = 0;
if pre then put _infile_;
if index(_infile_, '&amp;lt;pre&amp;gt;') then pre = 1;
run;
%inc 'macros.tmp' / nosource;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Apr 2020 02:45:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640600#M190855</guid>
      <dc:creator>wbaker0621</dc:creator>
      <dc:date>2020-04-17T02:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Error: Insufficient authorization to access C:\Windows\system32\macros.tmp.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640605#M190860</link>
      <description>&lt;P&gt;Place the full path of the folder you would like to have the output on the FILE statement. If you do not then you are defaulting to the drive where SAS is executing from, in this case the system folder, which is very likely locked down against casual writing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You file statement should look more like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File "C:\somefolder\output\macros.tmp";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your %include would have to have the same path referenced.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is a "best practice" to always place full paths from a drive (windows) or mount point in other file system.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 04:18:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640605#M190860</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-04-17T04:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Error: Insufficient authorization to access C:\Windows\system32\macros.tmp.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640606#M190861</link>
      <description>&lt;P&gt;The error message relates to next line:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%inc 'macros.tmp' / nosource;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;%INC stands for %include, that's to load a code file, in this case&lt;/P&gt;
&lt;P&gt;load file&lt;STRONG&gt; 'macros.tmp'&lt;/STRONG&gt; from a default root, resulted as &lt;STRONG&gt;C:\Windows\system32\macros.tmp.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This file probably holds macro programs code and need be included for compilation before use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the documentation, where from to download it to your PC and adapt the path&lt;/P&gt;
&lt;P&gt;to this file, as in:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;%include "&amp;lt;path to file&amp;gt;/macros.tmp";&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;/* use either single or double quotes */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 04:20:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640606#M190861</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-04-17T04:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Error: Insufficient authorization to access C:\Windows\system32\macros.tmp.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640620#M190869</link>
      <description>&lt;P&gt;For such temporary storage (as it seems to be needed only for downloading and then including the code), one can always use a temporary file reference:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/131;

filename macrotmp temp;

data _null_;
infile "http:&amp;amp;url/templft.html" device=url;
file macrotmp;
retain pre 0;
input;
if index(_infile_, '&amp;lt;/pre&amp;gt;') then pre = 0;
if pre then put _infile_;
if index(_infile_, '&amp;lt;pre&amp;gt;') then pre = 1;
run;

options source2;

%inc macrotmp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I set options source2 to verify that the code was actually loaded.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 07:10:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640620#M190869</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-17T07:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Error: Insufficient authorization to access C:\Windows\system32\macros.tmp.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640654#M190885</link>
      <description>&lt;P&gt;Yes, that worked. Thank you so much.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 09:49:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640654#M190885</guid>
      <dc:creator>wbaker0621</dc:creator>
      <dc:date>2020-04-17T09:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Error: Insufficient authorization to access C:\Windows\system32\macros.tmp.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640655#M190886</link>
      <description>&lt;P&gt;Yes, that was the problem. Thanks so much for the quick reply.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 09:49:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640655#M190886</guid>
      <dc:creator>wbaker0621</dc:creator>
      <dc:date>2020-04-17T09:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Error: Insufficient authorization to access C:\Windows\system32\macros.tmp.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640656#M190887</link>
      <description>&lt;P&gt;Thank you so much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 09:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-Error-Insufficient-authorization-to-access-C-Windows/m-p/640656#M190887</guid>
      <dc:creator>wbaker0621</dc:creator>
      <dc:date>2020-04-17T09:51:22Z</dc:date>
    </item>
  </channel>
</rss>

