<?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 SAS job fails when running in workflow in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600770#M17529</link>
    <description>&lt;P&gt;Hello SAS community. I recently developed a process using Enterprise Guide (EG). We use a grid environment on Linux. I worked with another area in our shop to have the SAS programs scheduled and run in a workflow. One of the jobs keeps failing when running in the workflow. It runs fine when I run it using EG.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error is:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;ERROR: Insufficient authorization to access &amp;lt;linux_location&amp;gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I have tried to troubleshoot and asked around with no luck. I am hoping someone can point me in the right direction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The job fails at the point where I open ODS Excel and attempt to write to an excel file. My speculation is the SAS job is attempting to write some output to a location that the job does not have access to. After asking around I got the impression that any output my job writes to the EG results viewer will cause this error. To that end I added a "ODS RESULTS OFF;" statement prior to opening the ODS destination. This does suppress the output from being displayed when running the code in EG, but still errors when running in the workflow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts or suggestions?&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2019 18:33:15 GMT</pubDate>
    <dc:creator>supp</dc:creator>
    <dc:date>2019-10-31T18:33:15Z</dc:date>
    <item>
      <title>SAS job fails when running in workflow</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600770#M17529</link>
      <description>&lt;P&gt;Hello SAS community. I recently developed a process using Enterprise Guide (EG). We use a grid environment on Linux. I worked with another area in our shop to have the SAS programs scheduled and run in a workflow. One of the jobs keeps failing when running in the workflow. It runs fine when I run it using EG.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error is:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;ERROR: Insufficient authorization to access &amp;lt;linux_location&amp;gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I have tried to troubleshoot and asked around with no luck. I am hoping someone can point me in the right direction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The job fails at the point where I open ODS Excel and attempt to write to an excel file. My speculation is the SAS job is attempting to write some output to a location that the job does not have access to. After asking around I got the impression that any output my job writes to the EG results viewer will cause this error. To that end I added a "ODS RESULTS OFF;" statement prior to opening the ODS destination. This does suppress the output from being displayed when running the code in EG, but still errors when running in the workflow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts or suggestions?&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 18:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600770#M17529</guid>
      <dc:creator>supp</dc:creator>
      <dc:date>2019-10-31T18:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job fails when running in workflow</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600779#M17530</link>
      <description>&lt;P&gt;The scheduled job will be running under a user account that does not have permission to write to that folder. Check with the area who did the scheduling to get this fixed.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 19:02:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600779#M17530</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-31T19:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job fails when running in workflow</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600784#M17532</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;. The prevailing thought is if the account doesn't have access then the SAS program shouldn't be writing to the location. To clarify, the location that is in the error message is not a location I am explicitly trying to write to in my program. The location of the ODS destination doesn't seem to be a problem. Despite the error the program does create the excel file, but with no data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran into a very similar issue once when my code had a "PROC SQL" step to create a macro variable. I had to add a "NOPRINT" to the step for it to work. Without the "NOPRINT" the program seemed to want to write the value of the macro variable to the location for which the program does not have access. It seems to me that the ODS statement is attempting to write something behind the scenes, giving me the error. Just my guess. If so, then if could there be a way to suppress this output?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 19:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600784#M17532</guid>
      <dc:creator>supp</dc:creator>
      <dc:date>2019-10-31T19:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job fails when running in workflow</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600790#M17533</link>
      <description>&lt;P&gt;Where is the location? If you simply want to stop SAS writing to this location then you will need to post the SAS log of your job causing the problem so we can figure out what is going on and offer advice.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 19:24:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600790#M17533</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-31T19:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job fails when running in workflow</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600798#M17534</link>
      <description>&lt;P&gt;Here is a snippet from the program and corresponding log where the error happens:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	create table something as
		select a.stuff
		from work.location as a
;quit;

/**===================================**/
/** Print reports to excel            **/
/**===================================**/

%let run_date = %sysfunc(today(), yymmdd10.);
%put &amp;amp;run_date.;


options nonotes nosource;

filename out "/location/of/excel/file/excel.xlsx";

ods results off;
ods excel close;
ods excel file=out style=excel options( ....
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.06 seconds
      user cpu time       0.06 seconds
      system cpu time     0.04 seconds
      memory              18609.67k
      OS Memory           47840.00k
      Timestamp           10/31/2019 10:43:21 AM
      Step Count                        61  Switch Count  0
      Page Faults                       0
      Page Reclaims                     4000
      Page Swaps                        0
      Voluntary Context Switches        466
      Involuntary Context Switches      38
      Block Input Operations            0
      Block Output Operations           384
      

2019-10-31

ERROR: Insufficient authorization to access 
       /location/not/referenced/in/program/work_flow_name.lst.
==&amp;gt; User code completed.
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The error happens right after the put statement for &amp;amp;run_date. The excel file gets created, just no data in it. The program runs fine for me in Enterprise Guide.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 19:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600798#M17534</guid>
      <dc:creator>supp</dc:creator>
      <dc:date>2019-10-31T19:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job fails when running in workflow</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600826#M17535</link>
      <description>&lt;P&gt;Adding this statement to the top of your program should fix it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS listing off;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Oct 2019 20:14:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/600826#M17535</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-31T20:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job fails when running in workflow</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/601049#M17537</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;, this sees to have solved it. I used ODS listing close; instead of ODS listing off;.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 18:36:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/601049#M17537</guid>
      <dc:creator>supp</dc:creator>
      <dc:date>2019-11-01T18:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS job fails when running in workflow</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/601108#M17539</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18331"&gt;@supp&lt;/a&gt; - Sorry yes CLOSE is the correct way - I didn't bother to check.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 22:00:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/SAS-job-fails-when-running-in-workflow/m-p/601108#M17539</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-11-01T22:00:05Z</dc:date>
    </item>
  </channel>
</rss>

