<?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: ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/ in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908662#M40655</link>
    <description>&lt;P&gt;I have no idea how that sasbatch.sh script works as I just use sas script to run SAS and that script DOES NOT change the working directory before starting SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have no control over the working directory that is set when your SAS code starts you can either&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Use a fully qualified name when referencing a file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile '/some directory name/getdata.lst' ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;2) Change the current working directory at the start of your SAS program so that it is a directory that has the files you want to read or allows you to write the file you want to write.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let sysrc=%sysfunc(dlgcdir(/some directory name/));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 Dec 2023 17:42:46 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-12-18T17:42:46Z</dc:date>
    <item>
      <title>ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908655#M40654</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I was trying to schedule a job in SAS Management Console using Schedule Manager. When I tested a simple program with the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc setinit;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the program ran successfully.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;But, when I tried to schedule another program that generates a .lst file during its execution, instead of generating the .lst file in the same directory as the SAS script, it attempted to write it to &lt;STRONG&gt;/sas/SASConf/Lev1/SASApp/.&lt;/STRONG&gt; &lt;BR /&gt;&lt;BR /&gt;This led to the following error:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/get_data.lst.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To avoid this error, I would like to know how I can specify another path for get_data.lst.&lt;/P&gt;
&lt;P&gt;Here is the full command in the job:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/sas/SASConf/Lev1/SASApp/BatchServer/sasbatch.sh -log /saslogs/recup_available_#Y.#m.#d_#H.#M.#s.log -batch -noterminal -logparm "rollover=session" -sysin /sas/SASConf/Lev1/SASApp/SASEnvironment/SASCode/Jobs/get_data.sas&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Dec 2023 17:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908655#M40654</guid>
      <dc:creator>Mahis</dc:creator>
      <dc:date>2023-12-18T17:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908662#M40655</link>
      <description>&lt;P&gt;I have no idea how that sasbatch.sh script works as I just use sas script to run SAS and that script DOES NOT change the working directory before starting SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have no control over the working directory that is set when your SAS code starts you can either&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Use a fully qualified name when referencing a file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile '/some directory name/getdata.lst' ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;2) Change the current working directory at the start of your SAS program so that it is a directory that has the files you want to read or allows you to write the file you want to write.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let sysrc=%sysfunc(dlgcdir(/some directory name/));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Dec 2023 17:42:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908662#M40655</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-12-18T17:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908686#M40657</link>
      <description>&lt;P&gt;One option is to add an ODS LISTING statement at the beginning of your program to direct output to a different directory:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing file = '/folder1/folder2/output.lst';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Another way is the -PRINT option on sasbatch: -print '&amp;nbsp;folder1/folder2/output.lst'&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 20:15:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908686#M40657</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-12-18T20:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908688#M40658</link>
      <description>&lt;P&gt;If that batch file works like the normal SAS command then you can add -log and -print options to tell where to write the .log and .lst files that SAS creates.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 02:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908688#M40658</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-12-19T02:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908722#M40659</link>
      <description>&lt;P&gt;I smashed my head a few times with this. Running the following code at the start of the session (e.g., in autoexec) helped:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* set "current path" to WORK */
%put %sysfunc(DLGCDIR(%sysfunc(pathname(WORK)))); /* DLGCDIR changes current directory */
filename _ ".";
filename _ list;
filename _ clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 21:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908722#M40659</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-12-18T21:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908732#M40660</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I smashed my head a few times with this. Running the following code at the start of the session (e.g., in autoexec) helped:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* set "current path" to WORK */
%put %sysfunc(DLGCDIR(%sysfunc(pathname(WORK)))); /* DLGCDIR changes current directory */
filename _ ".";
filename _ list;
filename _ clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't understand why they don't just fix the sasbatch script to set the current directory before it launches SAS?&amp;nbsp; I cannot think of ANY reason why launching with the goofy path that should be readonly to all users makes any sense at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You wouldn't tolerate such behaviour from other unix commands like.&amp;nbsp; Image if you ran sed on a file and it wrote the results to some far away directory you didn't specify?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is how our local sas script on Unix works to submit SAS jobs to LSF grid.&amp;nbsp; It makes sure to on the GRID node where SAS is running that it moves to the current directory before calling SAS to run the program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the current directory is not mounted on the node where SAS will execute then you get set to your HOME directory instead.&amp;nbsp; My impression that this is a basic feature of LSF grid manager and not anything fancy.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 22:38:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908732#M40660</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-12-18T22:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908747#M40662</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/445849"&gt;@Mahis&lt;/a&gt;&amp;nbsp;If you want to write a report to an output destination when running in batch then the program should define the output destination as part of an ODS statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS executable parameter -print &amp;lt;path&amp;gt; allows to define the default path for list output. If not set then the directory from which SAS starts will get used.&lt;/P&gt;
&lt;P&gt;SAS installation default doesn't set -print and the directory from which SAS starts when using&amp;nbsp;&amp;nbsp;.../SASApp/BatchServer/sasbatch.sh is .../SASApp&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a SAS Admin you could decide to set the -print default to a directory of your choosing - and you've got various options to do so. In the following two of them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could add an explicit -print parameter to the command line for the data step batch server in SAS Metadata.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the example it's /dev/null because almost always such .lst output under .../SASApp just gets created "by mistake" and is nothing developers/users are even aware of unless they get a permission error.&lt;/P&gt;
&lt;P&gt;You could of course also set the path to some directory where no one has write access (even admins/functional users) so everybody gets an error if trying to run code that creates such .lst files.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1702946580297.png" style="width: 720px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91708i402A7FB2F1626F09/image-dimensions/720x126?v=v2" width="720" height="126" role="button" title="Patrick_0-1702946580297.png" alt="Patrick_0-1702946580297.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another option is to set the default print destination in .../SASApp/BatchServer/sasbatch_usermods.sh&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_1-1702946964166.png" style="width: 666px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/91709iBF13FAEB72783649/image-dimensions/666x94?v=v2" width="666" height="94" role="button" title="Patrick_1-1702946964166.png" alt="Patrick_1-1702946964166.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;....and then there is of course also the option&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp;already proposed which you could apply in&amp;nbsp;.../SASApp/BatchServer/autoexec_usermods.sas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The autoexecs and batch.sh files are cascading so if you want to set such a default on a wider system level then just set it there (i.e. under&amp;nbsp;.../SASApp).&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;</description>
      <pubDate>Tue, 19 Dec 2023 01:45:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908747#M40662</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-12-19T01:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908768#M40663</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;, I don't know "&lt;EM&gt;why they don't just fix the sasbatch script&lt;/EM&gt;".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I were a SAS developer I would surely insist on change(*), but I'm not.&lt;/P&gt;
&lt;P&gt;If I were a SAS server admin I would set that up in the server configuration, but I'm not too.&lt;/P&gt;
&lt;P&gt;I'n a user and just proposed a potential solution to a other user's problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(*) Maybe the have so other dependencies and that's why it starts in that dir.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 07:20:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908768#M40663</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-12-19T07:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Insufficient authorization to access /sas/SASConf/Lev1/SASApp/</title>
      <link>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908819#M40668</link>
      <description>&lt;P&gt;Thank you all for your help. Changing the current working directory and adding the option of ODS listing solved the problem. But I started encountering other errors that I normally don't get when I run the program manually. After adding the &lt;STRONG&gt;-print /output path&lt;/STRONG&gt; in the command line in SAS Management Console, the problem has been resolved. Thank you so much.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 14:51:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/ERROR-Insufficient-authorization-to-access-sas-SASConf-Lev1/m-p/908819#M40668</guid>
      <dc:creator>Mahis</dc:creator>
      <dc:date>2023-12-19T14:51:27Z</dc:date>
    </item>
  </channel>
</rss>

