<?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 SAS Macro Help in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-Help/m-p/76384#M22155</link>
    <description>I'm really struggling here to figure out exactly how I can accomplish something that seems rather simple with a macro.&lt;BR /&gt;
&lt;BR /&gt;
I am using manipulating multiple datasets which are named very similarly.  Basically something along the lines of text01text01, then the next would be text01text02 and so on, until text02text01, etc.  The "text" part doesn't change, just the numbers.  Right now, it takes a lot of code to accomplish this, such as:&lt;BR /&gt;
&lt;BR /&gt;
data text01text01;&lt;BR /&gt;
set here.text01text01;&lt;BR /&gt;
var x=var y;&lt;BR /&gt;
...&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data text01text02;&lt;BR /&gt;
set here.text01text02;&lt;BR /&gt;
var x=var y;&lt;BR /&gt;
...&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
So...how do I setup a macro so I don't have to repeat this code for every dataset I read in?  I have looked around and tested some things out but I'm having trouble putting a macro into the name of the dataset.  Anyone have any suggestions?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance,&lt;BR /&gt;
Michael</description>
    <pubDate>Thu, 05 Mar 2009 17:04:44 GMT</pubDate>
    <dc:creator>MGaddis</dc:creator>
    <dc:date>2009-03-05T17:04:44Z</dc:date>
    <item>
      <title>SAS Macro Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-Help/m-p/76384#M22155</link>
      <description>I'm really struggling here to figure out exactly how I can accomplish something that seems rather simple with a macro.&lt;BR /&gt;
&lt;BR /&gt;
I am using manipulating multiple datasets which are named very similarly.  Basically something along the lines of text01text01, then the next would be text01text02 and so on, until text02text01, etc.  The "text" part doesn't change, just the numbers.  Right now, it takes a lot of code to accomplish this, such as:&lt;BR /&gt;
&lt;BR /&gt;
data text01text01;&lt;BR /&gt;
set here.text01text01;&lt;BR /&gt;
var x=var y;&lt;BR /&gt;
...&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data text01text02;&lt;BR /&gt;
set here.text01text02;&lt;BR /&gt;
var x=var y;&lt;BR /&gt;
...&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
So...how do I setup a macro so I don't have to repeat this code for every dataset I read in?  I have looked around and tested some things out but I'm having trouble putting a macro into the name of the dataset.  Anyone have any suggestions?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance,&lt;BR /&gt;
Michael</description>
      <pubDate>Thu, 05 Mar 2009 17:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-Help/m-p/76384#M22155</guid>
      <dc:creator>MGaddis</dc:creator>
      <dc:date>2009-03-05T17:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-Help/m-p/76385#M22156</link>
      <description>Ugg.  Apologies.  I posted this to the wrong forum by mistake.</description>
      <pubDate>Thu, 05 Mar 2009 17:06:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-Macro-Help/m-p/76385#M22156</guid>
      <dc:creator>MGaddis</dc:creator>
      <dc:date>2009-03-05T17:06:16Z</dc:date>
    </item>
  </channel>
</rss>

