<?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 with macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302899#M64301</link>
    <description>&lt;P&gt;Why do you have single and double quotes?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use only the double quotes.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2016 11:08:00 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-10-06T11:08:00Z</dc:date>
    <item>
      <title>x command with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302864#M64296</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ecountered this issue when I tried to use X command to open a file and file name has a macro variable: &amp;amp;basedt2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;X '"C:\Ma Project\01 Angeliebe daily tracking\raw data\ReportCustomerCsv-&amp;amp;basedt2..csv"';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It can not be executed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have a solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 08:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302864#M64296</guid>
      <dc:creator>weizhongma</dc:creator>
      <dc:date>2016-10-06T08:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: x command with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302866#M64297</link>
      <description>&lt;P&gt;What ERROR message did you get?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 08:06:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302866#M64297</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-06T08:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: x command with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302870#M64299</link>
      <description>&lt;P&gt;Two things, first you need to put&lt;/P&gt;
&lt;P&gt;options mlogic symbolgen mprint;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before that call and see what the macro variable relates to. &amp;nbsp;Then check that file exists - simple way of checking is to open a cmd window, then copy an dpaste the full text (not the macro variable) into the cmd window and see what it says. &amp;nbsp;Likely the path is wrong, or you have spaces. &amp;nbsp;Also note where you are running it. &amp;nbsp;It will have to be on a windows machine and have Excel installed and associated with .csv, otherwise the OS does not know what software to open it with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And a final question, why? &amp;nbsp;It seems totally pointless to open file on the OS.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 08:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302870#M64299</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-06T08:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: x command with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302899#M64301</link>
      <description>&lt;P&gt;Why do you have single and double quotes?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use only the double quotes.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302899#M64301</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-06T11:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: x command with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302905#M64302</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza﻿&lt;/a&gt; look closely. There are blanks in the pathname.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kurt's computing mantra #2: Blanks in filenames are a BAD IDEA.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302905#M64302</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-06T11:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: x command with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302908#M64303</link>
      <description>&lt;P&gt;Where is the command? &amp;nbsp;You have a path to a file, but X requires a system-based command that it will execute. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you saying this command sometimes does what you want if you don't refer to a macro variable within?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302908#M64303</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-10-06T11:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: x command with macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302911#M64304</link>
      <description>&lt;P&gt;Well, not quite&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding﻿&lt;/a&gt;. &amp;nbsp;If the file type is known by the system, in this case CSV is associated with Excel, then it actually opens Excel and then file. &amp;nbsp;Thats why I was questioning the reason behind it, opening the file, as SAS already has the options results which will open output files when created.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 11:28:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/x-command-with-macro-variable/m-p/302911#M64304</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-06T11:28:46Z</dc:date>
    </item>
  </channel>
</rss>

