<?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: file permission in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/247519#M258747</link>
    <description>Changing permissions after file creation is awkward. Consider setting default file permissions instead  (umask).</description>
    <pubDate>Tue, 02 Feb 2016 16:20:46 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2016-02-02T16:20:46Z</dc:date>
    <item>
      <title>file permission</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/109123#M258741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I execute a data step using enterprise guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data newtable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set existtab;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; code statement1..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; code statement2...&lt;/P&gt;&lt;P&gt; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after this data step is it possible to set desired read /write permission for this new table.&amp;nbsp; (by using sas code only)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Like how we change read/write permission of a file with a Unix command on unix prompt&amp;nbsp; -&amp;gt; chmod 666 filename; similarly can we do that using SAS code...???)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 20:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/109123#M258741</guid>
      <dc:creator>VijayKumar</dc:creator>
      <dc:date>2013-04-15T20:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: file permission</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/109124#M258742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Proc Datasets with the modify statement may do what you are looking for depending upon the permission you want.&lt;/P&gt;&lt;TABLE cellpadding="4" cellspacing="2"&gt;&lt;TBODY&gt;&lt;TR valign="top"&gt;&lt;TD&gt;&lt;SPAN class="strong"&gt;PROC DATASETS&lt;/SPAN&gt; LIBRARY=&lt;SPAN class="emph"&gt;libref&lt;/SPAN&gt; MEMTYPE=&lt;SPAN class="emph"&gt;member-type&lt;/SPAN&gt;; &lt;BR /&gt;MODIFY &lt;SPAN class="emph"&gt;member-name&lt;/SPAN&gt; (&lt;SPAN class="emph"&gt;password-level&lt;/SPAN&gt; = &lt;SPAN class="emph"&gt;password-modification&lt;/SPAN&gt;); &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE cellpadding="4" cellspacing="2"&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Password levels are READ=, WRITE=, ALTER= or PW=. The password can be different for each level.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 22:28:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/109124#M258742</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-04-15T22:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: file permission</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/109125#M258743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ballardw for your reply...&lt;/P&gt;&lt;P&gt;I looked at PROC DATASETS and I am a bit confused..&amp;nbsp; as&amp;nbsp; READ=, WRITE=, ALTER= or PW=.&amp;nbsp; are for giving passwords...&lt;/P&gt;&lt;P&gt;I will try to make my question more clear..&lt;/P&gt;&lt;P&gt;Suppose I have a dataset XYZ.sas7bdat&lt;/P&gt;&lt;P&gt;On unix system , when I do&amp;nbsp; -&amp;gt;&amp;nbsp; ls -ltr XYZ.sas7bdat&lt;/P&gt;&lt;P&gt;I get,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-rw-------&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ownername&amp;nbsp;&amp;nbsp;&amp;nbsp; XYZ.sas7bdat&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now , as per your suggestions , after using PROC datasets, how can I get following ......&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;-rw-rw-rw-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ownername&amp;nbsp;&amp;nbsp;&amp;nbsp; XYZ.sas7bdat&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 07:06:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/109125#M258743</guid>
      <dc:creator>VijayKumar</dc:creator>
      <dc:date>2013-04-16T07:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: file permission</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/109126#M258744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to issue the unix chmod command to change permissions, using the SAS X command or one of it's cousins.&lt;/P&gt;&lt;P&gt;From memory it would be something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;X chmod 666 filename ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which might have to be remote submitted &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 07:59:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/109126#M258744</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2013-04-16T07:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: file permission</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/109127#M258745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But if you are not the owner of the file and the permissions are &lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;-rw-------&lt;/STRONG&gt;&amp;nbsp; chmod will fail.&amp;nbsp; You should talk to you IT guys about changing your user profile to create files with the required permissions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 08:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/109127#M258745</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2013-04-16T08:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: file permission</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/247365#M258746</link>
      <description>&lt;P&gt;If you do not have permissions&amp;nbsp;andnot the owner unix will not let you write to the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS code will error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may want to use,&lt;/P&gt;&lt;P&gt;filename chmod pipe "chmod 777 /home/source/datasetname.sas7bdat";&lt;BR /&gt;data _null_; file chmod; run;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 03:19:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/247365#M258746</guid>
      <dc:creator>Dhaval12</dc:creator>
      <dc:date>2016-02-02T03:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: file permission</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/247519#M258747</link>
      <description>Changing permissions after file creation is awkward. Consider setting default file permissions instead  (umask).</description>
      <pubDate>Tue, 02 Feb 2016 16:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/247519#M258747</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-02-02T16:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: file permission</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/247525#M258748</link>
      <description>Yes that is also a good idea.&lt;BR /&gt;In live environments where we have end users with access to files it may just be helpful to give permissions once the entire job processing is complete.&lt;BR /&gt;Wouldn't want someone opening a file in SAS while process is running. May cause job to abend.&lt;BR /&gt;So the method you would want to use may be subjective to the type or environment setup and your process.&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Feb 2016 16:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-permission/m-p/247525#M258748</guid>
      <dc:creator>Dhaval12</dc:creator>
      <dc:date>2016-02-02T16:27:39Z</dc:date>
    </item>
  </channel>
</rss>

