<?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: macro to create a shell for multiple treatment groups in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro-to-create-a-shell-for-multiple-treatment-groups/m-p/446925#M112210</link>
    <description>Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;!</description>
    <pubDate>Mon, 19 Mar 2018 19:34:04 GMT</pubDate>
    <dc:creator>jenim514</dc:creator>
    <dc:date>2018-03-19T19:34:04Z</dc:date>
    <item>
      <title>macro to create a shell for multiple treatment groups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-create-a-shell-for-multiple-treatment-groups/m-p/446922#M112208</link>
      <description>&lt;P&gt;Hi all, &amp;nbsp;I need a little help with a macro. &amp;nbsp;I basically need the below code to repeat exactly for the 9 treatment groups to create a dummy shell. &amp;nbsp;I then the output from each treatment group to 'stack' as to create a large shell &amp;nbsp;with 31 observations output from each treatment group. &amp;nbsp;The away this is currently written, I am only getting output from group 'T" (the last entered group).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Help is appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro dummy (tx);
data dummy ;
do tx="&amp;amp;tx";
	do ord=11 to 41;
		if ord=11 then do;
		do sord=1 to 2 ;
		output;
		end;
		end;
	if ord=21 then do;
		do sord=1 to 8;
		output;
		end;
		end;

	if ord=31 then do;
		do sord=1 to 12;
		output;
		end;
		end;
	if ord=41 then do;
		do sord=1 to 9;
		output;
		end;
		end;
	end;
end;
run;
%mend dummy;
%dummy (A);
%dummy (B);
%dummy (C);
%dummy (D);
%dummy (E);
%dummy (F);
%dummy (G);
%dummy (H);
%dummy(T);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 19:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-create-a-shell-for-multiple-treatment-groups/m-p/446922#M112208</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2018-03-19T19:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: macro to create a shell for multiple treatment groups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-create-a-shell-for-multiple-treatment-groups/m-p/446924#M112209</link>
      <description>&lt;P&gt;To get your program to work, get rid of the macro language.&amp;nbsp; Take this statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do tx="&amp;amp;tx";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change it to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do tx = 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'T';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you can get rid of everything that is macro-related and be left with a DATA step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As it stands now, each time you call the macro, you replace the data set DUMMY.&amp;nbsp; That seems like the wrong thing to do.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 19:30:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-create-a-shell-for-multiple-treatment-groups/m-p/446924#M112209</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-03-19T19:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: macro to create a shell for multiple treatment groups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-create-a-shell-for-multiple-treatment-groups/m-p/446925#M112210</link>
      <description>Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;!</description>
      <pubDate>Mon, 19 Mar 2018 19:34:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-create-a-shell-for-multiple-treatment-groups/m-p/446925#M112210</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2018-03-19T19:34:04Z</dc:date>
    </item>
  </channel>
</rss>

