<?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: input excel info into macro syntax in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/input-excel-info-into-macro-syntax/m-p/631469#M187101</link>
    <description>&lt;P&gt;Combine your Excels into one dataset, from which you can then use call execute() to call your macro.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2020 08:01:40 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-03-12T08:01:40Z</dc:date>
    <item>
      <title>input excel info into macro syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/input-excel-info-into-macro-syntax/m-p/631466#M187100</link>
      <description>&lt;P&gt;good day,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;below is my program&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;%macro sqlmerchant(A=,B=,C=,ab=);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE &amp;amp;A AS &lt;BR /&gt;SELECT * ,"&amp;amp;ab" AS NAME ,"Y" as Cleaned_flag FROM Merch_clean_latest_raw_backup&lt;BR /&gt;WHERE Merchant_Name LIKE &amp;amp;b&lt;BR /&gt;AND "merchant_name_alias.mcc"N IN (SELECT MCC FROM Merchant_list_v2 WHERE 'Merchant Category'n in &amp;amp;C )&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;%MEND;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%sqlmerchant(A=MCDONALD,B="%MCDONALD%",C=("Miscellaneous Stores"),ab=Mcdonald);&lt;/P&gt;
&lt;P&gt;%sqlmerchant(A=WATSONSWINE,B="%WATSONSWINE%",C=("Miscellaneous Stores"),ab=Watsons Wine);&lt;/P&gt;
&lt;P&gt;%sqlmerchant(A=WATSONS,B="%WATSONS%",C=("Miscellaneous Stores"),ab=Watsons);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is my macro code.I have to search a list of merchant in a big data base.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and the list of merchant name and merchant code are stored in two excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can i set up a program which can let the macro read from the excel automatically . so that i can avoid to input all my name list into macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks in advance,&lt;/P&gt;
&lt;P&gt;Harry&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 07:52:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/input-excel-info-into-macro-syntax/m-p/631466#M187100</guid>
      <dc:creator>harrylui</dc:creator>
      <dc:date>2020-03-12T07:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: input excel info into macro syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/input-excel-info-into-macro-syntax/m-p/631469#M187101</link>
      <description>&lt;P&gt;Combine your Excels into one dataset, from which you can then use call execute() to call your macro.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 08:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/input-excel-info-into-macro-syntax/m-p/631469#M187101</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-12T08:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: input excel info into macro syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/input-excel-info-into-macro-syntax/m-p/631604#M187152</link>
      <description>Sure, import your Excel workbook and then you have that in a data set. You can pass the parameters to a macro call using CALL EXECUTE. &lt;BR /&gt;&lt;BR /&gt;The CALL EXECUTE documentation has an example at the bottom that illustrates the idea.</description>
      <pubDate>Thu, 12 Mar 2020 15:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/input-excel-info-into-macro-syntax/m-p/631604#M187152</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-03-12T15:20:10Z</dc:date>
    </item>
  </channel>
</rss>

