<?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: Importing by using macro in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Importing-by-using-macro/m-p/76507#M22186</link>
    <description>%macro import(output=,path=);&lt;BR /&gt;
PROC IMPORT OUT= &amp;amp;output&lt;BR /&gt;
            DATAFILE= "&amp;amp;path"&lt;BR /&gt;
            DBMS=DLM REPLACE;&lt;BR /&gt;
     DELIMITER='7C'x; &lt;BR /&gt;
     GETNAMES=YES;&lt;BR /&gt;
     DATAROW=2; &lt;BR /&gt;
RUN;&lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
%import(output=ss,path=C:\SAM\DQ\Data\SQL Data\CITY_PIN3.txt);</description>
    <pubDate>Mon, 09 Mar 2009 08:42:38 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-03-09T08:42:38Z</dc:date>
    <item>
      <title>Importing by using macro</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-by-using-macro/m-p/76505#M22184</link>
      <description>i have aimport code how can i keep it in macro and reuse it the code is here now i want to change the outfile and datafile only by using macro.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PROC IMPORT OUT= WORK.ASd &lt;BR /&gt;
            DATAFILE= "C:\Documents and Settings\Ma&lt;BR /&gt;
r\dq_sample.xls" &lt;BR /&gt;
            DBMS=EXCEL5 REPLACE;&lt;BR /&gt;
     GETNAMES=YES;&lt;BR /&gt;
RUN;</description>
      <pubDate>Fri, 06 Mar 2009 10:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-by-using-macro/m-p/76505#M22184</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-06T10:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Importing by using macro</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-by-using-macro/m-p/76506#M22185</link>
      <description>Macros are executed, optionally with macro variable substition on the command line.  Then, the macro variable reference is made using a &amp;amp;varname, as shown below:&lt;BR /&gt;
&lt;BR /&gt;
%MACRO MYMACRO(MYVAR);&lt;BR /&gt;
%PUT MYVAR IS SUBSTITUTED AS: &amp;amp;MYVAR;&lt;BR /&gt;
%MEND MYMACRO;&lt;BR /&gt;
%MYMACRO(some_value);&lt;BR /&gt;
&lt;BR /&gt;
Refer to the SAS Macro Language documentation at the SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  and the DOC web page:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/onlinedoc/91pdf/index.html" target="_blank"&gt;http://support.sas.com/documentation/onlinedoc/91pdf/index.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/onlinedoc/913/getDoc/en/mcrolref.hlp/a002293969.htm" target="_blank"&gt;http://support.sas.com/onlinedoc/913/getDoc/en/mcrolref.hlp/a002293969.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 06 Mar 2009 10:34:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-by-using-macro/m-p/76506#M22185</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-03-06T10:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Importing by using macro</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Importing-by-using-macro/m-p/76507#M22186</link>
      <description>%macro import(output=,path=);&lt;BR /&gt;
PROC IMPORT OUT= &amp;amp;output&lt;BR /&gt;
            DATAFILE= "&amp;amp;path"&lt;BR /&gt;
            DBMS=DLM REPLACE;&lt;BR /&gt;
     DELIMITER='7C'x; &lt;BR /&gt;
     GETNAMES=YES;&lt;BR /&gt;
     DATAROW=2; &lt;BR /&gt;
RUN;&lt;BR /&gt;
%mend;&lt;BR /&gt;
&lt;BR /&gt;
%import(output=ss,path=C:\SAM\DQ\Data\SQL Data\CITY_PIN3.txt);</description>
      <pubDate>Mon, 09 Mar 2009 08:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Importing-by-using-macro/m-p/76507#M22186</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-09T08:42:38Z</dc:date>
    </item>
  </channel>
</rss>

