<?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: macro resolution in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro-resolution/m-p/75461#M16253</link>
    <description>Thanks for the tip!</description>
    <pubDate>Mon, 12 Oct 2009 18:35:01 GMT</pubDate>
    <dc:creator>SASPhile</dc:creator>
    <dc:date>2009-10-12T18:35:01Z</dc:date>
    <item>
      <title>macro resolution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-resolution/m-p/75459#M16251</link>
      <description>macro wksht resolves to 'Data Template$' (with quotes around it).&lt;BR /&gt;
when i run the following i get an error:&lt;BR /&gt;
&lt;BR /&gt;
%macro test;&lt;BR /&gt;
proc sql;&lt;BR /&gt;
connect to excel (path="&amp;amp;inpt.\Nationwide Childrens Hospital 2009 08.xls"&lt;BR /&gt;
header=no mixed=yes );&lt;BR /&gt;
&lt;BR /&gt;
create table NationwideChildern as&lt;BR /&gt;
select * from connection to excel &lt;BR /&gt;
%if %substr(%superQ(wksht),1,1) = %str(%') %then %do;&lt;BR /&gt;
(select * from [%sysfunc(dequote(%superQ(wksht)))]);&lt;BR /&gt;
%end;&lt;BR /&gt;
%else %do;&lt;BR /&gt;
(select * from [&amp;amp;wksht]);&lt;BR /&gt;
%end; &lt;BR /&gt;
disconnect from excel;&lt;BR /&gt;
quit;&lt;BR /&gt;
%mend test;&lt;BR /&gt;
%test;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: %substr(%superQ(wksht),1,1) = '&lt;BR /&gt;
ERROR: The macro TEST will stop executing</description>
      <pubDate>Mon, 12 Oct 2009 14:58:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-resolution/m-p/75459#M16251</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2009-10-12T14:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: macro resolution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-resolution/m-p/75460#M16252</link>
      <description>try %Qsubstr</description>
      <pubDate>Mon, 12 Oct 2009 15:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-resolution/m-p/75460#M16252</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-10-12T15:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: macro resolution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-resolution/m-p/75461#M16253</link>
      <description>Thanks for the tip!</description>
      <pubDate>Mon, 12 Oct 2009 18:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-resolution/m-p/75461#M16253</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2009-10-12T18:35:01Z</dc:date>
    </item>
  </channel>
</rss>

