LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 26 Nov 2002 10:37:13 -0800
Reply-To:   "William W. Viergever" <wwvierg@ATTGLOBAL.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "William W. Viergever" <wwvierg@ATTGLOBAL.NET>
Subject:   Re: Macro variables and X command
Comments:   To: Ian Whitlock <WHITLOI1@WESTAT.COM>
In-Reply-To:   <08B08C9FA5EBD311A2CC009027D5BF8102E2B539@remailnt2-re01.we>
Content-Type:   text/html; charset="us-ascii"

<html> At 09:13 AM 11/26/2002 -0500, Ian Whitlock wrote:<br><br> <blockquote type=cite class=cite cite>Mark,<br><br> One time honored solution is indicated by<br><br> &nbsp;&nbsp; %let fn = c:\junk\this is data to be deleted.txt ;<br> &nbsp;&nbsp; x &quot;type &quot;&quot;&amp;fn&quot;&quot;&quot; ;<br><br> The problem with<br><br> &nbsp;&nbsp; %let fn = 'c:\junk\this is data to be deleted.txt' ;<br> &nbsp;&nbsp; x &quot;type '&amp;fn'&quot; ;<br><br> is that on my system Windows 98 the message &quot;TOO MANY PARAMETERS&quot; is<br> returned.&nbsp; I think it probably has something to do with the fact that single<br> quotes are legitimate in filenames.</blockquote><br><br> <br> Where is the Electric Horseman (aka: Kilo Volt) when we need him, eh?<br><br> Indeed, this *is* a bugger, and alas, I have no answer either ... just some observations.<br><br> Using Win 2K Pro ...<br><br> 1st off, even in a Command Prompt (i.e., DOS box), starting at C:&gt;, I could not get the START command:<br><br> <font color="#0000FF">START &quot;F:\My Documents\Excel\Final 00-01 OBRA figures.XLS&quot; <br><br> </font>to work. <br><br> Typing <font color="#0000FF">START /?&nbsp; </font>gives:<br><br> <font color="#0000FF">non-executable files may be invoked through their file association just<br> &nbsp;&nbsp;&nbsp; by typing the name of the file as a command.&nbsp; (e.g.&nbsp; WORD.DOC would<br> &nbsp;&nbsp;&nbsp; launch the application associated with the .DOC file extension).<br> &nbsp;&nbsp;&nbsp; See the ASSOC and FTYPE commands for how to create these<br> &nbsp;&nbsp;&nbsp; associations from within a command script.<br><br> </font>which to me implies that it should, however I suspect it only works when you're in the same directory, for if I changed drives to <font color="#0000FF">F:</font> and directories to <font color="#0000FF">&quot;My Documents\Excel&quot;</font> and then issued:<br><br> <font color="#0000FF">&quot;Final 00-01 OBRA figures.XLS&quot;Final 00-01 OBRA figures.XLS&quot; <br><br> </font>then Excel would start and load that spreadsheet. I could also issue the following command:<br><br> <font color="#0000FF">&quot;D:\Microsoft Office\Office\excel.exe&quot; &quot;F:\My Documents\Excel\Final 00-01 OBRA figures.XLS&quot;<br><br> </font>and again, Excel would start and load that spreadsheet.<br><br> ....<br><br> So, in SAS (v8.2), I tried<br><br> <font color="#0000FF">options</font> noxsync mprint mlogic symbolgen ;<br> <font color="#0000FF">%let</font> exe&nbsp;&nbsp;&nbsp;&nbsp; = &quot;D:\Microsoft Office\Office\excel.exe&quot; ;<br> <font color="#0000FF">%let</font> xlsfile = &quot;F:\My Documents\Excel\Final 00-01 OBRA figures.XLS&quot; ;<br><br> <font color="#0000FF">x</font> <font color="#800080">&quot;&amp;exe &amp;xlsfile&quot;</font> ;<br><br> <font color="#008000">*-- x &quot;D:\Microsoft Office\Office\excel.exe&quot; &amp;xlsfile&quot; ;<br> *-- x &quot;&quot;D:\Microsoft Office\Office\excel.exe&quot;&quot; &amp;xlsfile&quot; ;<br><br> *-- x '&quot;D:\Microsoft Office\Office\excel.exe&quot; &quot;F:\My Documents\Excel\Final 00-01 OBRA figures.XLS&quot;' ;<br> *-- x 'f: &amp; cd &quot;My Documents\Excel&quot; &amp; &quot;Final 00-01 OBRA figures.XLS&quot;' ;<br><br> </font>and the <font color="#0000FF">x</font> <font color="#800080">&quot;&amp;exe &amp;xlsfile&quot;</font> worked.<br><br> Note: neither of the first two commented-out X-statements worked (when un-commented-out of course &lt;g&gt;); also if you look these two in the Enhanced Editor you will see the differing colors that should give a hint that it would not work beforehand:<br><br> <font color="#0000FF">x</font> <font color="#800080">&quot;D:\Microsoft Office\Office\excel.exe&quot;</font> &amp;xlsfile<font color="#800080">&quot; ;<br><br> </font>and<br><br> <font color="#0000FF">x</font> <font color="#008080"><b>&quot;&quot;D</b></font>:\Microsoft Office\Office\excel.exe<font color="#800080">&quot;&quot;</font> &amp;xlsfile<font color="#008080"><b>&quot; ;<br><br> </b></font>Also, the latter two commented-out X-statements did work (i.e., w/ no macro var being used).<br><br> Thus is it appears that since you've got to have the X-statement in double quotes to get the macro var to resolve, that precludes any other use of double quotes within that X-statement.<br><br> Lastly, noting that<br><br> <font color="#0000FF">x</font> <font color="#008080"><b>&quot;&quot;D</b></font>:\Microsoft Office\Office\excel.exe<font color="#800080">&quot;&quot;</font> &amp;xlsfile<font color="#008080"><b>&quot; ;<br><br> </b></font>from above didn't work (basically seeing x &quot;&quot; as meaningless), I tried:<br><br> <font color="#0000FF">x</font> <font color="#800080">&quot;&quot;&quot;D:\Microsoft Office\Office\excel.exe&quot;&quot;&amp;xlsfile&quot;</font> ;<br><br> which did open Excel, however, the spreadheet was not.<br><br> HTH<br><br> <br> <div>------------------------------------------------------------</div> <div>William W. Viergever&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Voice&nbsp; : (916) 483-8398</div> <div>Viergever &amp; Associates&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax&nbsp;&nbsp;&nbsp; : (916) 486-1488</div> <div>Sacramento, CA 95825&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E-mail :</div> <div>------------------------------------------------------------</div> <br> </html>

Back to: Top of message | Previous page | Main SAS-L page