<?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: SAS X Command and Read-Only in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269131#M53310</link>
    <description>&lt;P&gt;Sorry I explained that poorly, the NOXWAIT means it closes the prompt and I return to SAS automatically, I just want to not see the command prompt pop up at all, even for a split second, I do not want to see it (this is my OCD kicking in!)&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 May 2016 09:38:32 GMT</pubDate>
    <dc:creator>craig159753</dc:creator>
    <dc:date>2016-05-09T09:38:32Z</dc:date>
    <item>
      <title>SAS X Command and Read-Only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269117#M53299</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I was wondering, can you run the following bit of code within SAS to set a&amp;nbsp;file to read only mode?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;x attrib r+ C:\My Work\Documents\example.doc;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%sysexec attrib r+ C:\My Work\Documents\example.doc;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried running it and it did not work, am I missing something?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 08:22:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269117#M53299</guid>
      <dc:creator>craig159753</dc:creator>
      <dc:date>2016-05-09T08:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS X Command and Read-Only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269119#M53300</link>
      <description>&lt;P&gt;In your first example you miss quotes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;x 'attrib r+ "C:\My Work\Documents\example.doc"';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note the singel quotes around the whole DOS part, and the double quotes around the path - double quotes are needed as there are spaces in the path - this means the actual underlying path is not really like that as old dos does not allow spaces or long paths etc. so the UNC path needs quoting.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Although why you are doing it this way is a mystery to me? &amp;nbsp;If its needs to be secure then post it to a document storage (version/access controlled) such as Sharepoint, or use the VCS on your system. &amp;nbsp;Otherwise every time you want to do anything you need to unlock run re-lock, which just seems a bit pointless.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 08:35:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269119#M53300</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-05-09T08:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS X Command and Read-Only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269122#M53303</link>
      <description>&lt;P&gt;I think you command should be attrib +r instead of attrib r+&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;x attrib +r C:\My Work\Documents\example.doc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if it do not work then provide full path of attrib.exe i.e.&amp;nbsp;&lt;SPAN&gt;C:\Windows\system32\attrib.exe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;x C:\Windows\system32\attrib.exe +r C:\My Work\Documents\example.doc;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 08:45:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269122#M53303</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2016-05-09T08:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS X Command and Read-Only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269128#M53307</link>
      <description>&lt;P&gt;Hi Perfect!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree a CVS system is far better, however I am unable to use this at this moment in time.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Quick additional question is there a way to stop the command window open and closing, I want it to run like SAS code, with no windows popping out? Because currently when it runs, the command window flashes up quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 09:26:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269128#M53307</guid>
      <dc:creator>craig159753</dc:creator>
      <dc:date>2016-05-09T09:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS X Command and Read-Only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269129#M53308</link>
      <description>&lt;P&gt;Yep:&lt;/P&gt;
&lt;P&gt;options noxwait;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/67962/HTML/default/viewer.htm#n0xwt90ik8vxdrn13708w6n3nm4o.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hostwin/67962/HTML/default/viewer.htm#n0xwt90ik8vxdrn13708w6n3nm4o.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 09:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269129#M53308</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-05-09T09:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS X Command and Read-Only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269131#M53310</link>
      <description>&lt;P&gt;Sorry I explained that poorly, the NOXWAIT means it closes the prompt and I return to SAS automatically, I just want to not see the command prompt pop up at all, even for a split second, I do not want to see it (this is my OCD kicking in!)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 09:38:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269131#M53310</guid>
      <dc:creator>craig159753</dc:creator>
      <dc:date>2016-05-09T09:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS X Command and Read-Only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269133#M53312</link>
      <description>&lt;P&gt;Afraid not, if you call a shell command, it opens the command window.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 09:50:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269133#M53312</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-05-09T09:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS X Command and Read-Only</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269137#M53313</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32706"&gt;@craig159753﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you issue the shell command via a pipe, the command prompt should not pop up:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename doscmd pipe 'attrib +r "C:\My Work\Documents\example.doc"';

data _null_;
infile doscmd;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 May 2016 10:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-X-Command-and-Read-Only/m-p/269137#M53313</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-05-09T10:09:13Z</dc:date>
    </item>
  </channel>
</rss>

