<?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 Need Help on Macro Coding in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Need-Help-on-Macro-Coding/m-p/16533#M3044</link>
    <description>I created these &amp;amp;VARS &amp;amp;FILEN1 - &amp;amp;FILEN9 in a DATA Step as follows;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 DATA _NULL_;&lt;BR /&gt;
    RETAIN NUMCSV 0; &lt;BR /&gt;
    INFILE INP LENGTH=ILEN;&lt;BR /&gt;
    INPUT DIRLINE $VARYING100. ILEN;&lt;BR /&gt;
    NUMCSV = NUMCSV + 1;&lt;BR /&gt;
    FILEN = COMPRESS("FILEN" || PUT(NUMCSV,2.));&lt;BR /&gt;
    CALL SYMPUT(FILEN,DIRLINE);&lt;BR /&gt;
    CALL SYMPUT("NUMCSV",NUMCSV);&lt;BR /&gt;
    RUN;&lt;BR /&gt;
&lt;BR /&gt;
And now I want to process each in a %MACRO %DO LOOP changing the x in the following &amp;amp;FILENx from 1 to 9.&lt;BR /&gt;
&lt;BR /&gt;
%DO I = 1 %TO &amp;amp;NUMCSV;&lt;BR /&gt;
    ...&lt;BR /&gt;
    FILENAME WINPERF "&amp;amp;FILENx";&lt;BR /&gt;
    ...&lt;BR /&gt;
%END;&lt;BR /&gt;
&lt;BR /&gt;
Can anyone point me in the right direction?</description>
    <pubDate>Wed, 05 May 2010 20:33:23 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-05-05T20:33:23Z</dc:date>
    <item>
      <title>Need Help on Macro Coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-Help-on-Macro-Coding/m-p/16533#M3044</link>
      <description>I created these &amp;amp;VARS &amp;amp;FILEN1 - &amp;amp;FILEN9 in a DATA Step as follows;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 DATA _NULL_;&lt;BR /&gt;
    RETAIN NUMCSV 0; &lt;BR /&gt;
    INFILE INP LENGTH=ILEN;&lt;BR /&gt;
    INPUT DIRLINE $VARYING100. ILEN;&lt;BR /&gt;
    NUMCSV = NUMCSV + 1;&lt;BR /&gt;
    FILEN = COMPRESS("FILEN" || PUT(NUMCSV,2.));&lt;BR /&gt;
    CALL SYMPUT(FILEN,DIRLINE);&lt;BR /&gt;
    CALL SYMPUT("NUMCSV",NUMCSV);&lt;BR /&gt;
    RUN;&lt;BR /&gt;
&lt;BR /&gt;
And now I want to process each in a %MACRO %DO LOOP changing the x in the following &amp;amp;FILENx from 1 to 9.&lt;BR /&gt;
&lt;BR /&gt;
%DO I = 1 %TO &amp;amp;NUMCSV;&lt;BR /&gt;
    ...&lt;BR /&gt;
    FILENAME WINPERF "&amp;amp;FILENx";&lt;BR /&gt;
    ...&lt;BR /&gt;
%END;&lt;BR /&gt;
&lt;BR /&gt;
Can anyone point me in the right direction?</description>
      <pubDate>Wed, 05 May 2010 20:33:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-Help-on-Macro-Coding/m-p/16533#M3044</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-05T20:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on Macro Coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-Help-on-Macro-Coding/m-p/16534#M3045</link>
      <description>Hi:&lt;BR /&gt;
  There are some suggestions and references in this previous forum posting:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?threadID=9640&amp;amp;tstart=0" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=9640&amp;amp;tstart=0&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 05 May 2010 20:48:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-Help-on-Macro-Coding/m-p/16534#M3045</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-05-05T20:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on Macro Coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-Help-on-Macro-Coding/m-p/16535#M3046</link>
      <description>The info I found and needed was that the "I" counter variable in the &lt;BR /&gt;
%DO I=1 TO ... is referenced as "&amp;amp;I" when in the %MACRO and to suffix it to the other AmperVar &amp;amp;FILEN  I needed to code 2 ampersands &amp;amp;&amp;amp;FILEN&amp;amp;I.  Thank You</description>
      <pubDate>Thu, 06 May 2010 13:44:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-Help-on-Macro-Coding/m-p/16535#M3046</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-06T13:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help on Macro Coding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-Help-on-Macro-Coding/m-p/16536#M3047</link>
      <description>Very useful links using the Google advanced search arguments below, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
macro variable introduction site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
macro variable generate code site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 06 May 2010 17:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-Help-on-Macro-Coding/m-p/16536#M3047</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-05-06T17:35:17Z</dc:date>
    </item>
  </channel>
</rss>

