<?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: How to use FILELOCK=NONE with code in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/649892#M36098</link>
    <description>&lt;P&gt;When you work in a client/server environment, files on the server (including SAS dataset files) belong to the user who writes them. Since the default setting for file access permissions on server systems is so that only the owner can write to those files, another user can't run the same code to replace the dataset.&lt;/P&gt;
&lt;P&gt;There are several ways around this, probably depending on operating system used:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;use a proper umask setting when creating the dataset, so that write permissions are extended for a group (if users share the same group membership)&lt;/LI&gt;
&lt;LI&gt;set an ACL (access control list) to allow write permission to a specific user. Since this needs an external command, XCMD must be enabled&lt;/LI&gt;
&lt;LI&gt;remove the dataset (using operating system commands) prior to (re)creating it; this also requires XCMD&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Fri, 22 May 2020 12:47:07 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-05-22T12:47:07Z</dc:date>
    <item>
      <title>How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/649800#M36091</link>
      <description>&lt;P&gt;Hello, I would like to share code with my colleague, so he can use it, and rerun it when I am out of office. But I can't enter FILELOCK=NONE properly. I haven't found many topics about that online, just basic script which I can't seem to apply to my code.&lt;/P&gt;&lt;P&gt;My shortened code looks like this:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data S600.PAID (REPLACE=yes); 
length NAME $ 30;
set IACS PRV SOT SP;
created = "%sysfunc(datetime(), datetime19.)";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 May 2020 08:49:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/649800#M36091</guid>
      <dc:creator>Tesera</dc:creator>
      <dc:date>2020-05-22T08:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/649892#M36098</link>
      <description>&lt;P&gt;When you work in a client/server environment, files on the server (including SAS dataset files) belong to the user who writes them. Since the default setting for file access permissions on server systems is so that only the owner can write to those files, another user can't run the same code to replace the dataset.&lt;/P&gt;
&lt;P&gt;There are several ways around this, probably depending on operating system used:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;use a proper umask setting when creating the dataset, so that write permissions are extended for a group (if users share the same group membership)&lt;/LI&gt;
&lt;LI&gt;set an ACL (access control list) to allow write permission to a specific user. Since this needs an external command, XCMD must be enabled&lt;/LI&gt;
&lt;LI&gt;remove the dataset (using operating system commands) prior to (re)creating it; this also requires XCMD&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 22 May 2020 12:47:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/649892#M36098</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-22T12:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/650037#M36109</link>
      <description>&lt;P&gt;The FILELOCK option only works on Unix and mainframe&amp;nbsp; - is your SAS software running on one of these? Assuming you are running on Unix you can use FILELOCK on a LIBNAME statement as documented here:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=hostunx&amp;amp;docsetTarget=p0bnp6asvws4don1jxyxe9cc91wb.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;Unix LIBNAME&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 21:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/650037#M36109</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-05-22T21:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/650998#M36116</link>
      <description>&lt;P&gt;We have Windows in work. I think I will drop the idea of sharing code with my colleague, it seems to complicated for me.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 07:47:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/650998#M36116</guid>
      <dc:creator>Tesera</dc:creator>
      <dc:date>2020-05-27T07:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/650999#M36117</link>
      <description>&lt;P&gt;Thank you for your ideas. But I dont have many options as I am not administrator of the computer, so I am allowed only to do basic things.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 07:51:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/650999#M36117</guid>
      <dc:creator>Tesera</dc:creator>
      <dc:date>2020-05-27T07:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651241#M36127</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/313031"&gt;@Tesera&lt;/a&gt;&amp;nbsp;- Do you use a remote SAS server with EG or not? An easy way to tell is if you use an EG connection profile then you have a remote SAS server. If your remote SAS server runs on Unix then FILELOCK is available.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 23:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651241#M36127</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-05-27T23:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651310#M36129</link>
      <description>&lt;P&gt;Yes, I have to connect to remote server to gain access to libraries in work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So then the code would look like this?:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data S600.PAID (REPLACE=yes);
FILELOCK=NONE; 
length NAME $ 30;
set IACS PRV SOT SP;
created = "%sysfunc(datetime(), datetime19.)";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Because I dont really understand in which part should I use the filelock statement.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 07:17:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651310#M36129</guid>
      <dc:creator>Tesera</dc:creator>
      <dc:date>2020-05-28T07:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651312#M36130</link>
      <description>&lt;P&gt;Please run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname s600 list;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and post the resulting log. This will give us a clearer picture.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 07:24:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651312#M36130</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-28T07:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651317#M36132</link>
      <description>&lt;P&gt;this is whole log:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Program (2)';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='C:\Users\machova\Desktop\moje sas\Monitoring.egp';
6          %LET _CLIENTPROJECTPATHHOST='PC0800';
7          %LET _CLIENTPROJECTNAME='Monitoring.egp';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=PNG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGSR TEMP;
15         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16             STYLE=HTMLBlue
17             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
18             NOGTITLE
19             NOGFOOTNOTE
20             GPATH=&amp;amp;sasworklocation
21             ENCODING=UTF8
22             options(rolap="on")
23         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24         
25         GOPTIONS ACCESSIBLE;
26         libname s600 list;
NOTE: Libref=   S600 
      Scope=    Object Server
      Engine=   BASE
      Physical Name= M:\SAS\S600
      Filename= M:\SAS\S600
      Owner Name= BUILTIN\Administrators
      File Size=              4KB
      File Size (bytes)= 4096
27         
28         GOPTIONS NOACCESSIBLE;
29         %LET _CLIENTTASKLABEL=;
30         %LET _CLIENTPROCESSFLOWNAME=;
31         %LET _CLIENTPROJECTPATH=;
32         %LET _CLIENTPROJECTPATHHOST=;
33         %LET _CLIENTPROJECTNAME=;
34         %LET _SASPROGRAMFILE=;
35         %LET _SASPROGRAMFILEHOST=;
36         
37         ;*';*";*/;quit;run;
38         ODS _ALL_ CLOSE;
39         
40         
41         QUIT; RUN;
42         &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 May 2020 07:32:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651317#M36132</guid>
      <dc:creator>Tesera</dc:creator>
      <dc:date>2020-05-28T07:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651318#M36133</link>
      <description>&lt;P&gt;The only thing I was able to find in the documentation regarding FILELOCK is this:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=hostunx&amp;amp;docsetTarget=n1824lspl1ny8gn1f6or44dbaj9k.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;FILELOCKS= System Option on UNIX&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will only influence the behavior of&amp;nbsp;&lt;U&gt;concurrent&lt;/U&gt; SAS sessions, not how access permissions are set for permanent files. This needs to be done with &lt;FONT face="courier new,courier"&gt;umask&lt;/FONT&gt; settings or the external command &lt;FONT face="courier new,courier"&gt;chmod&lt;/FONT&gt; (if you actually work on a UNIX system).&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 07:35:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651318#M36133</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-28T07:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651319#M36134</link>
      <description>&lt;P&gt;So your SAS server runs on Windows, the FILELOCKS system option will not be available. If different users have issues overwriting each other's datasets, check with your SAS and server admins to have the necessary settings changed.&lt;/P&gt;
&lt;P&gt;I can't help with this (I wouldn't touch Windows Server with the proverbial ten-foot pole).&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 07:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651319#M36134</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-28T07:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use FILELOCK=NONE with code</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651329#M36135</link>
      <description>&lt;P&gt;Thank you for your help! I will contact&amp;nbsp;&lt;SPAN&gt;server administrators if it is possible for me. Thank you again!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 08:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-FILELOCK-NONE-with-code/m-p/651329#M36135</guid>
      <dc:creator>Tesera</dc:creator>
      <dc:date>2020-05-28T08:38:34Z</dc:date>
    </item>
  </channel>
</rss>

