<?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 ERROR: Insufficient authorization to access C:\WINDOWS\system32\&amp;amp;file. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Insufficient-authorization-to-access-C-WINDOWS-system32/m-p/851169#M41918</link>
    <description>&lt;P&gt;I am trying to create export macro in SAS Enterprise Guide 8.3 version&lt;/P&gt;
&lt;P&gt;I got error---&amp;nbsp; &amp;nbsp;ERROR: Insufficient authorization to access C:\WINDOWS\system32\&amp;amp;file.&lt;/P&gt;
&lt;P&gt;when using the macro&lt;/P&gt;
&lt;P&gt;my code is as below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro export(dset,file);&lt;BR /&gt;proc export data=&amp;amp;dset&lt;BR /&gt;outfile='&amp;amp;file'&lt;BR /&gt;dbms=csv&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%export (sashelp.cars,C:\Users\shree\Desktop\SAS LIb\cars.csv);&lt;/P&gt;
&lt;PRE&gt;1                                                          The SAS System                           10:59 Tuesday, December 27, 2022

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Program';
4          %LET _CLIENTPROCESSFLOWNAME='Standalone Not In Project';
5          %LET _CLIENTPROJECTPATH='';
6          %LET _CLIENTPROJECTPATHHOST='';
7          %LET _CLIENTPROJECTNAME='';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=SVG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         %macro HTML5AccessibleGraphSupported;
15             %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) &amp;gt;= 0 %then ACCESSIBLE_GRAPH;
16         %mend;
17         ODS LISTING GPATH=&amp;amp;sasworklocation;
18         FILENAME EGHTML TEMP;
19         ODS HTML5(ID=EGHTML) FILE=EGHTML
20             OPTIONS(BITMAP_MODE='INLINE')
21             %HTML5AccessibleGraphSupported
22             ENCODING='utf-8'
23             STYLE=HTMLBlue
24             NOGTITLE
25             NOGFOOTNOTE
26             GPATH=&amp;amp;sasworklocation
27         ;
NOTE: Writing HTML5(EGHTML) Body file: EGHTML
28         
29         %macro export(dset,file);
30         proc export data=&amp;amp;dset
31         outfile='&amp;amp;file'
32         dbms=csv
33         replace;
34         run;
35         %mend;
36         
37         
38         %export (sashelp.cars,C:\Users\shree\Desktop\SAS LIb\cars.csv);

39          /**********************************************************************
40          *   PRODUCT:   SAS
41          *   VERSION:   9.4
42          *   CREATOR:   External File Interface
43          *   DATE:      27DEC22
44          *   DESC:      Generated SAS Datastep Code
45          *   TEMPLATE SOURCE:  (None Specified.)
46          ***********************************************************************/
47             data _null_;
48             %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
49             %let _EFIREC_ = 0;     /* clear export record count macro variable */
50             file '&amp;amp;file' delimiter=',' DSD DROPOVER lrecl=32767;
51             if _n_ = 1 then        /* write column names or labels */
52              do;
53                put
54                   "Make"
55                ','
56                   "Model"
2                                                          The SAS System                           10:59 Tuesday, December 27, 2022

57                ','
58                   "Type"
59                ','
60                   "Origin"
61                ','
62                   "DriveTrain"
63                ','
64                   "MSRP"
65                ','
66                   "Invoice"
67                ','
68                   "EngineSize"
69                ','
70                   "Cylinders"
71                ','
72                   "Horsepower"
73                ','
74                   "MPG_City"
75                ','
76                   "MPG_Highway"
77                ','
78                   "Weight"
79                ','
80                   "Wheelbase"
81                ','
82                   "Length"
83                ;
84              end;
85            set  SASHELP.CARS   end=EFIEOD;
86                format Make $13. ;
87                format Model $40. ;
88                format Type $8. ;
89                format Origin $6. ;
90                format DriveTrain $5. ;
91                format MSRP dollar8. ;
92                format Invoice dollar8. ;
93                format EngineSize best12. ;
94                format Cylinders best12. ;
95                format Horsepower best12. ;
96                format MPG_City best12. ;
97                format MPG_Highway best12. ;
98                format Weight best12. ;
99                format Wheelbase best12. ;
100               format Length best12. ;
101             do;
102               EFIOUT + 1;
103               put Make $ @;
104               put Model $ @;
105               put Type $ @;
106               put Origin $ @;
107               put DriveTrain $ @;
108               put MSRP @;
109               put Invoice @;
110               put EngineSize @;
111               put Cylinders @;
112               put Horsepower @;
113               put MPG_City @;
114               put MPG_Highway @;
3                                                          The SAS System                           10:59 Tuesday, December 27, 2022

115               put Weight @;
116               put Wheelbase @;
117               put Length ;
118               ;
119             end;
120            if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
121            if EFIEOD then call symputx('_EFIREC_',EFIOUT);
122            run;

ERROR: Insufficient authorization to access C:\WINDOWS\system32\&amp;amp;file.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 1 observations read from the data set SASHELP.CARS.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

0 records created in &amp;amp;file from SASHELP.CARS.
  
  
NOTE: "&amp;amp;file" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
      real time           0.10 seconds
      cpu time            0.10 seconds
      

123        
124        %LET _CLIENTTASKLABEL=;
125        %LET _CLIENTPROCESSFLOWNAME=;
126        %LET _CLIENTPROJECTPATH=;
127        %LET _CLIENTPROJECTPATHHOST=;
128        %LET _CLIENTPROJECTNAME=;
129        %LET _SASPROGRAMFILE=;
130        %LET _SASPROGRAMFILEHOST=;
131        
132        ;*';*";*/;quit;run;
133        ODS _ALL_ CLOSE;
134        
135        
136        QUIT; RUN;
137&lt;/PRE&gt;</description>
    <pubDate>Tue, 27 Dec 2022 06:54:38 GMT</pubDate>
    <dc:creator>Kishor_Gavade</dc:creator>
    <dc:date>2022-12-27T06:54:38Z</dc:date>
    <item>
      <title>ERROR: Insufficient authorization to access C:\WINDOWS\system32\&amp;file.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Insufficient-authorization-to-access-C-WINDOWS-system32/m-p/851169#M41918</link>
      <description>&lt;P&gt;I am trying to create export macro in SAS Enterprise Guide 8.3 version&lt;/P&gt;
&lt;P&gt;I got error---&amp;nbsp; &amp;nbsp;ERROR: Insufficient authorization to access C:\WINDOWS\system32\&amp;amp;file.&lt;/P&gt;
&lt;P&gt;when using the macro&lt;/P&gt;
&lt;P&gt;my code is as below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro export(dset,file);&lt;BR /&gt;proc export data=&amp;amp;dset&lt;BR /&gt;outfile='&amp;amp;file'&lt;BR /&gt;dbms=csv&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%export (sashelp.cars,C:\Users\shree\Desktop\SAS LIb\cars.csv);&lt;/P&gt;
&lt;PRE&gt;1                                                          The SAS System                           10:59 Tuesday, December 27, 2022

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Program';
4          %LET _CLIENTPROCESSFLOWNAME='Standalone Not In Project';
5          %LET _CLIENTPROJECTPATH='';
6          %LET _CLIENTPROJECTPATHHOST='';
7          %LET _CLIENTPROJECTNAME='';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=SVG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         %macro HTML5AccessibleGraphSupported;
15             %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) &amp;gt;= 0 %then ACCESSIBLE_GRAPH;
16         %mend;
17         ODS LISTING GPATH=&amp;amp;sasworklocation;
18         FILENAME EGHTML TEMP;
19         ODS HTML5(ID=EGHTML) FILE=EGHTML
20             OPTIONS(BITMAP_MODE='INLINE')
21             %HTML5AccessibleGraphSupported
22             ENCODING='utf-8'
23             STYLE=HTMLBlue
24             NOGTITLE
25             NOGFOOTNOTE
26             GPATH=&amp;amp;sasworklocation
27         ;
NOTE: Writing HTML5(EGHTML) Body file: EGHTML
28         
29         %macro export(dset,file);
30         proc export data=&amp;amp;dset
31         outfile='&amp;amp;file'
32         dbms=csv
33         replace;
34         run;
35         %mend;
36         
37         
38         %export (sashelp.cars,C:\Users\shree\Desktop\SAS LIb\cars.csv);

39          /**********************************************************************
40          *   PRODUCT:   SAS
41          *   VERSION:   9.4
42          *   CREATOR:   External File Interface
43          *   DATE:      27DEC22
44          *   DESC:      Generated SAS Datastep Code
45          *   TEMPLATE SOURCE:  (None Specified.)
46          ***********************************************************************/
47             data _null_;
48             %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
49             %let _EFIREC_ = 0;     /* clear export record count macro variable */
50             file '&amp;amp;file' delimiter=',' DSD DROPOVER lrecl=32767;
51             if _n_ = 1 then        /* write column names or labels */
52              do;
53                put
54                   "Make"
55                ','
56                   "Model"
2                                                          The SAS System                           10:59 Tuesday, December 27, 2022

57                ','
58                   "Type"
59                ','
60                   "Origin"
61                ','
62                   "DriveTrain"
63                ','
64                   "MSRP"
65                ','
66                   "Invoice"
67                ','
68                   "EngineSize"
69                ','
70                   "Cylinders"
71                ','
72                   "Horsepower"
73                ','
74                   "MPG_City"
75                ','
76                   "MPG_Highway"
77                ','
78                   "Weight"
79                ','
80                   "Wheelbase"
81                ','
82                   "Length"
83                ;
84              end;
85            set  SASHELP.CARS   end=EFIEOD;
86                format Make $13. ;
87                format Model $40. ;
88                format Type $8. ;
89                format Origin $6. ;
90                format DriveTrain $5. ;
91                format MSRP dollar8. ;
92                format Invoice dollar8. ;
93                format EngineSize best12. ;
94                format Cylinders best12. ;
95                format Horsepower best12. ;
96                format MPG_City best12. ;
97                format MPG_Highway best12. ;
98                format Weight best12. ;
99                format Wheelbase best12. ;
100               format Length best12. ;
101             do;
102               EFIOUT + 1;
103               put Make $ @;
104               put Model $ @;
105               put Type $ @;
106               put Origin $ @;
107               put DriveTrain $ @;
108               put MSRP @;
109               put Invoice @;
110               put EngineSize @;
111               put Cylinders @;
112               put Horsepower @;
113               put MPG_City @;
114               put MPG_Highway @;
3                                                          The SAS System                           10:59 Tuesday, December 27, 2022

115               put Weight @;
116               put Wheelbase @;
117               put Length ;
118               ;
119             end;
120            if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
121            if EFIEOD then call symputx('_EFIREC_',EFIOUT);
122            run;

ERROR: Insufficient authorization to access C:\WINDOWS\system32\&amp;amp;file.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 1 observations read from the data set SASHELP.CARS.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

0 records created in &amp;amp;file from SASHELP.CARS.
  
  
NOTE: "&amp;amp;file" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
      real time           0.10 seconds
      cpu time            0.10 seconds
      

123        
124        %LET _CLIENTTASKLABEL=;
125        %LET _CLIENTPROCESSFLOWNAME=;
126        %LET _CLIENTPROJECTPATH=;
127        %LET _CLIENTPROJECTPATHHOST=;
128        %LET _CLIENTPROJECTNAME=;
129        %LET _SASPROGRAMFILE=;
130        %LET _SASPROGRAMFILEHOST=;
131        
132        ;*';*";*/;quit;run;
133        ODS _ALL_ CLOSE;
134        
135        
136        QUIT; RUN;
137&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Dec 2022 06:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Insufficient-authorization-to-access-C-WINDOWS-system32/m-p/851169#M41918</guid>
      <dc:creator>Kishor_Gavade</dc:creator>
      <dc:date>2022-12-27T06:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient authorization to access C:\WINDOWS\system32\&amp;file.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Insufficient-authorization-to-access-C-WINDOWS-system32/m-p/851173#M41919</link>
      <description>&lt;P&gt;I edited your question so that the log is posted in proper manner.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the FILE statement, use double quotes; macro triggers (&amp;amp; and %) are not resolved inside single quotes.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 06:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Insufficient-authorization-to-access-C-WINDOWS-system32/m-p/851173#M41919</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-12-27T06:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient authorization to access C:\WINDOWS\system32\&amp;file.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Insufficient-authorization-to-access-C-WINDOWS-system32/m-p/851175#M41920</link>
      <description>Thanks so much it works</description>
      <pubDate>Tue, 27 Dec 2022 07:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Insufficient-authorization-to-access-C-WINDOWS-system32/m-p/851175#M41920</guid>
      <dc:creator>Kishor_Gavade</dc:creator>
      <dc:date>2022-12-27T07:09:54Z</dc:date>
    </item>
  </channel>
</rss>

