<?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: X command/statement does not work anymore in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157654#M263050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of your symptoms look like issue I had in past on Unix where someone had created an alias for the rm command to always add the -i option so that the operating system was expecting user confirmation before removing a file.&amp;nbsp; Is it possible in Windows to set on option that always forces the user to confirm file deletions ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is why I always try to wrap OS commands inside of a data step using PIPE so that I can see any messages that the OS might be trying to send me.&amp;nbsp; For example try this for the expression 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile &lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;"copy D:\BAT_TEST\a.txt D:\BAT_TEST\b.txt" pipe ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _infile_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Dec 2014 14:09:13 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2014-12-19T14:09:13Z</dc:date>
    <item>
      <title>X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157650#M263046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The X command/statement I use to execute some .bat files does not work anymore, It was working in the past.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This condition applies to cmd commands, like &amp;lt;&amp;lt;X "del c:\test.txt";&amp;gt;&amp;gt; or &amp;lt;&amp;lt;X "c:\test\test_1\sample.bat"&amp;gt;&amp;gt;. You can find the details below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; CODE_BLOCK_1&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;options noxwait noxsync;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*1.expression*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc1 = system('del D:\BAT_TEST\b.txt');&lt;/P&gt;&lt;P&gt;&amp;nbsp; put rc1=;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*2.expression*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc2 = system('notepad');&lt;/P&gt;&lt;P&gt;&amp;nbsp; put rc2=;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*3.expression*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc3=system("cmd");&lt;/P&gt;&lt;P&gt;&amp;nbsp; put rc3=;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*4.expression*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc4 = system("copy D:\BAT_TEST\a.txt D:\BAT_TEST\b.txt");&lt;/P&gt;&lt;P&gt;&amp;nbsp; put rc4=;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*5.expression*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc5 = system("notepad_2");&lt;/P&gt;&lt;P&gt;&amp;nbsp; put rc5=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; CODE_BLOCK_1 DOES NOT WORK &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2. and 3. expression work , they open notepad and cmd applications&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; but 1. and 4. expression do not work. And they generate an error code like "-2147475449", but no documentation is available on the web&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I can find just one discussion about it --&amp;gt; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://social.technet.microsoft.com/Forums/de-DE/62fb1152-9604-4f68-a6be-a3f6fa8019a9/returncode-2147475449-bei-befehl-copy-oder-del-in-cmdexe"&gt;https://social.technet.microsoft.com/Forums/de-DE/62fb1152-9604-4f68-a6be-a3f6fa8019a9/returncode-2147475449-bei-befehl-copy-oder-del-in-cmdexe&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I have converted "-2147475449" to decimal and result is "80002007", but still there is no evidence about the issue.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; It looks like we can not execute cmd commands from sas, but in normal cmd window same command works fine&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; An interesting detail is, the last expression(5. expression) generates the same result as 1. and 4. expression, -2147475449. But only difference between 5. expression &lt;/P&gt;&lt;P&gt;&amp;nbsp; and 2. expression is wrong application definition. I have added an "_2" string to "notepad". &lt;/P&gt;&lt;P&gt;&amp;nbsp; I mean there is no different error code like "notepad_2 application was not found" etc...&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Log details are below&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc1=-2147475449&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc2=0&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc3=0&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc4=-2147475449&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc5=-2147475449&lt;/P&gt;&lt;P&gt;&amp;nbsp; NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.12 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.03 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.04 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 274.96k&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OS Memory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29416.00k&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/19/2014 12:45:06 PM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Step Count&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 116&amp;nbsp; Switch Count&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In the conf. file XCMD option is set like -XCMD&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Log details are below&lt;/P&gt;&lt;P&gt;&amp;nbsp; %put XCMD Value = %sysfunc(getoption(noxcmd));&lt;/P&gt;&lt;P&gt;&amp;nbsp; XCMD Value = XCMD&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; CODE_BLOCK_2&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;x 'del D:\BAT_TEST\b.txt';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; CODE_BLOCK_2 DOES NOT WORK &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Result is same as CODE_BLOCK_1&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Log details are below&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1368&amp;nbsp; x 'del D:\BAT_TEST\b.txt'&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1368!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; CODE_BLOCK_3&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;filename test 'D:\BAT_TEST\b.txt';&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; rc=fdelete('test');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; put rc=;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; msg=sysmsg();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; put msg=;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; CODE_BLOCK_3 WORKS FINE &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; It deletes the file(D:\BAT_TEST\b.txt)&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Log details are below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 06&amp;nbsp; filename test 'D:\BAT_TEST\a.txt';&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1307&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1308&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc=fdelete('test');&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1309&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put rc=;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1310&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg=sysmsg();&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1311&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put msg=;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1312&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc=0&lt;/P&gt;&lt;P&gt;&amp;nbsp; msg=&lt;/P&gt;&lt;P&gt;&amp;nbsp; NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 256.00k&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OS Memory&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29416.00k&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/19/2014 11:12:15 AM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Step Count&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 104&amp;nbsp; Switch Count&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; CODE_BLOCK_4&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;x notepad;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; CODE_BLOCK_4 WORKS FINE &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; It opens notepad.exe&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Log details are below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1385&amp;nbsp; x notepad&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1385!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 11:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157650#M263046</guid>
      <dc:creator>sascı</dc:creator>
      <dc:date>2014-12-19T11:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157651#M263047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Several things here.&amp;nbsp; Firstly what is it your trying to do.&amp;nbsp; If its delete files then use the SAS functions there.&amp;nbsp; If your trying to do some more things in your OS, then IO would suggest you look at scripting for the OS, there are far better alternatives out there for example: &lt;A class="active_link" href="https://www.autoitscript.com/site/"&gt;https://www.autoitscript.com/site/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;VB scripting etc.&amp;nbsp; Secondly your have provided a wall of text there but no diagnostics.&amp;nbsp; You are sending commands out to the OS, therefore you need to check that the files/paths are correct and present, run the command in the OS - I note that your command appears to be for windows, ensure the code isn't running on a mainframe.&amp;nbsp; Make sure you have permission to delete from that directory.&amp;nbsp; It not to do with the xcmd if some command work and others not.&amp;nbsp; More likely to be a wrong path/file or permission.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 11:37:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157651#M263047</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-12-19T11:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157652#M263048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-I have permission to delete these files&lt;/P&gt;&lt;P&gt;2-I have already tried to delete the files from CMD, and it works, no problem&lt;/P&gt;&lt;P&gt;3-All the paths are actual, as I told at item-2 everything is ok when I try to delete(or another operation) from CMD&lt;/P&gt;&lt;P&gt;4-There is no situation like "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;some command work and others not&lt;/SPAN&gt;", no command(CMD command) works with X statement or X command, and same commands work with a filename epx. as in "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;CODE_BLOCK_3", so I just meant "it is not about" XCMD option&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;5-I can already solve the problem with a filename exp. as in "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;CODE_BLOCK_3&lt;/SPAN&gt;", my curiosity is what causes this problem, so your first suggestion is not applicable for me&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;6-All of the answers of your questions already exist in my message, that s why I have provided a&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; wall of text.&lt;/SPAN&gt;&lt;/SPAN&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>Fri, 19 Dec 2014 12:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157652#M263048</guid>
      <dc:creator>sascı</dc:creator>
      <dc:date>2014-12-19T12:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157653#M263049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if you try to run the del or copy command with "cmd /c " prepended?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ask because cmd exists as cmd.exe, but there is no copy.exe or del.exe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 13:52:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157653#M263049</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-12-19T13:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157654#M263050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of your symptoms look like issue I had in past on Unix where someone had created an alias for the rm command to always add the -i option so that the operating system was expecting user confirmation before removing a file.&amp;nbsp; Is it possible in Windows to set on option that always forces the user to confirm file deletions ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is why I always try to wrap OS commands inside of a data step using PIPE so that I can see any messages that the OS might be trying to send me.&amp;nbsp; For example try this for the expression 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile &lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;"copy D:\BAT_TEST\a.txt D:\BAT_TEST\b.txt" pipe ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _infile_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 14:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157654#M263050</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-12-19T14:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157655#M263051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You also mention "it was working in the past". Have you had any changes to your system such as upgrade of OS, many things from Windows quit working or require substantial changes with the release of Windows 7, SAS version, network settings. Also if SAS is running in a server environment then the SAS Admin may have changed some setting related to the X command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 16:24:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157655#M263051</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-12-19T16:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157656#M263052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your suggestion is very helpful and works, but I still curious about the problem, because it was working one month ago.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 16:58:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157656#M263052</guid>
      <dc:creator>sascı</dc:creator>
      <dc:date>2014-12-19T16:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157657#M263053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are right, I am using this method right now to get a quickwin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as I told to &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="828210" data-username="KurtBremser" href="https://communities.sas.com/people/KurtBremser" id="jive-82821034388246739834186" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #0e66ba;"&gt;KurtBremser&lt;/A&gt;&lt;/STRONG&gt; it is just curiosity &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&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>Fri, 19 Dec 2014 17:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157657#M263053</guid>
      <dc:creator>sascı</dc:creator>
      <dc:date>2014-12-19T17:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157658#M263054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is win2008 R2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked everything about this problem on the OS side, but I could not find any evidence. Of course I dont know where to look, if you have any suggestion I can try...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 17:07:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157658#M263054</guid>
      <dc:creator>sascı</dc:creator>
      <dc:date>2014-12-19T17:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157659#M263055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remember there is a difference in the environment you are getting using the X-cmd and what you are doing in a clean users/shell prompt.&lt;/P&gt;&lt;P&gt;Ah you arlready noticed this difference&lt;/P&gt;&lt;P&gt;The approach of Tom using the piping is the most clean why to see the most of the messages and it helps in synchronizing the processing.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That synchronizing of processes is an inforeseen pitfall. As normal user you are expecting to see what is happening .... mythe to be busted.&lt;/P&gt;&lt;P&gt;Many programs are starting a new shell that is popping up, dropping the old one. Notepad is doing that.&lt;/P&gt;&lt;P&gt;The piping is forcing a sync execution of the xcmd, there is however a system option that can change that behavior with x-usage.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;See &lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#p1lye1z610q1rbn1ch6zbpeqcrn2.htm" title="http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#p1lye1z610q1rbn1ch6zbpeqcrn2.htm"&gt;SAS(R) 9.3 Companion for Windows&lt;/A&gt; (xsync xwait). When it set to asynchronous mode you will see nothing to be happened where it is actually run.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;As you are x function is working you could verfiy&amp;nbsp; the shell-environment. Use the set command! There must be differences the start of sas is changing that environment.&lt;/P&gt;&lt;P&gt;One of those change must be the root-cause of your issue.&lt;/P&gt;&lt;P&gt;The same is even more worse in Linux/Unix&amp;nbsp; when you get the xcmd active you are inheriting a lot of the objectspawners key and not your key. Limits and other special behavior can be surprising.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My advice:&lt;/P&gt;&lt;P&gt;only let OS guys let install SAS when they understand SAS and verify the all this functionality not getting harmed by their standard way of working.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 20:51:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157659#M263055</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-12-19T20:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: X command/statement does not work anymore</title>
      <link>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157660#M263056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It could be a Windows update, or someone changed settings at the server so that the commands that are internal to the shell (like copy and del) don't work under certain circumstances. Or SAS is calling a different shell than the orginal cmd now.&lt;/P&gt;&lt;P&gt;You are working in a Windows environment, so expect the unexpected to happen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 06:27:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/X-command-statement-does-not-work-anymore/m-p/157660#M263056</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-12-22T06:27:26Z</dc:date>
    </item>
  </channel>
</rss>

