<?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: output from macro as an input to another macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/output-from-macro-as-an-input-to-another-macro/m-p/46978#M9699</link>
    <description>There is no "lag" type function for macro variables - suggest you track "n" unique macro variable values as "MyMacroVar1" through "MyMacroVar99" or however many you need to run through.&lt;BR /&gt;
&lt;BR /&gt;
It would be more useful to explain what you are attempting to accomplish for beneficial feedback from the forum subscribers, particularly how you start the process, then each iterative step, working through to the final objective / output.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Sun, 11 Jul 2010 03:13:03 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-07-11T03:13:03Z</dc:date>
    <item>
      <title>output from macro as an input to another macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-from-macro-as-an-input-to-another-macro/m-p/46977#M9698</link>
      <description>I would like to have call a macro as an input to another macro, and am wondering if there is a good way to do that?&lt;BR /&gt;
&lt;BR /&gt;
For example, I have &lt;B&gt;%macro1&lt;/B&gt; that transforms a variable and renames it.&lt;BR /&gt;
&lt;BR /&gt;
%macro1(input1=raw_variable) &lt;BR /&gt;
 ==&amp;gt; output is renamed_raw_var&lt;BR /&gt;
&lt;BR /&gt;
I want to write another %macro2 that takes in "renamed_raw_var" and makes the lags of the variable based on the type of the variable.&lt;BR /&gt;
&lt;BR /&gt;
%macro2(input2=renamed_raw_var)&lt;BR /&gt;
&lt;BR /&gt;
Finally, can I do this ? &lt;B&gt;%macro2(input2=%macro1(input1=raw_variable) )&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
which I tried but did not work. Any suggestion would be greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Sat, 10 Jul 2010 16:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-from-macro-as-an-input-to-another-macro/m-p/46977#M9698</guid>
      <dc:creator>SAS_user_n</dc:creator>
      <dc:date>2010-07-10T16:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: output from macro as an input to another macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/output-from-macro-as-an-input-to-another-macro/m-p/46978#M9699</link>
      <description>There is no "lag" type function for macro variables - suggest you track "n" unique macro variable values as "MyMacroVar1" through "MyMacroVar99" or however many you need to run through.&lt;BR /&gt;
&lt;BR /&gt;
It would be more useful to explain what you are attempting to accomplish for beneficial feedback from the forum subscribers, particularly how you start the process, then each iterative step, working through to the final objective / output.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Sun, 11 Jul 2010 03:13:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/output-from-macro-as-an-input-to-another-macro/m-p/46978#M9699</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-07-11T03:13:03Z</dc:date>
    </item>
  </channel>
</rss>

