<?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: Running a program for different populations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964504#M375621</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/466238"&gt;@dxiao2017&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/242"&gt;@nsns&lt;/a&gt;&amp;nbsp;I have another question for you: why there is a period (or dot) behind your macro variable &amp;amp;pop (,please see the picture, I marked it out with a red circle)?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106305i9F06BB9AF5F8CD09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;, I am not sure whether the %local statement in my second macro write correctly, could you help confirm it? Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please start a new thread with these questions, as they are not really on topic in this thread.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Apr 2025 11:57:47 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2025-04-17T11:57:47Z</dc:date>
    <item>
      <title>Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964428#M375594</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have a program with a %let pop=ITT (to choose ITT analysis population) in the beginning.&amp;nbsp; Within the program I have code that has the condition if &amp;amp;pop.="Y" .&amp;nbsp; How can I code this so that I can run the entire program for ITT and then for PP population?&lt;/P&gt;
&lt;P&gt;Thanks in advance for any ideas.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 13:58:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964428#M375594</guid>
      <dc:creator>nsns</dc:creator>
      <dc:date>2025-04-16T13:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964429#M375595</link>
      <description>&lt;P&gt;Without seeing your program, its nearly impossible to advise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is ITT the &lt;FONT color="#FF0000"&gt;&lt;EM&gt;name&lt;/EM&gt; &lt;/FONT&gt;of a variable, or is it the&lt;FONT color="#FF0000"&gt;&lt;EM&gt; value&lt;/EM&gt;&lt;/FONT&gt; of a variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 14:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964429#M375595</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-04-16T14:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964444#M375598</link>
      <description>Thank you for your suggestion.&lt;BR /&gt;&lt;BR /&gt;By groups wouldn’t work because of the structure of the datasets. There are variables to identify which observations (ie subjects) belong to which populations. Ie ITT=Y/N, PP=Y/N.&lt;BR /&gt;The code is basically&lt;BR /&gt;&lt;BR /&gt;%let pop= ITT&lt;BR /&gt;data a;&lt;BR /&gt;Set b;&lt;BR /&gt;If &amp;amp;pop.=“Y”;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;Run;&lt;BR /&gt;&lt;BR /&gt;This repeats a few times in the program  bringing in and merging different datasets where the condition &amp;amp;pop.=“Y” is used. There are also some macros within the code. With a summary table at the end.&lt;BR /&gt;&lt;BR /&gt;I Want to produce the same summary table&lt;BR /&gt;For the different analysis populations.&lt;BR /&gt;&lt;BR /&gt;I hope this clarifies the issue a bit&lt;BR /&gt;&lt;/CODE&gt;</description>
      <pubDate>Wed, 16 Apr 2025 15:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964444#M375598</guid>
      <dc:creator>nsns</dc:creator>
      <dc:date>2025-04-16T15:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964445#M375599</link>
      <description>&lt;P&gt;I feel uneasy recommending code after seeing an obviously contrived program. However, this is the outline of what you would do.&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 do_this(pop);
     data a;
          set b(where=(&amp;amp;pop="Y"));
          ...
     run;
     /* the rest of your code goes here */
%mend;

%do_this(ITT)
%do_this(PP)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 16:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964445#M375599</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-04-16T16:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964479#M375610</link>
      <description>&lt;P&gt;Thanks Paige,&lt;/P&gt;
&lt;P&gt;I understand the hesitation.&amp;nbsp; The program is pretty convoluted with macros embedded inside.&amp;nbsp; I actually figured out how to get the macro for the populations to work - I added two ampersands i.e.&amp;nbsp; if &amp;amp;&amp;amp;pop.="Y";&amp;nbsp; to each place within the program. This seems to work well now.&amp;nbsp; I am not completely sure why or how this works - but will figure that out. Thanks for your input.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 07:16:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964479#M375610</guid>
      <dc:creator>nsns</dc:creator>
      <dc:date>2025-04-17T07:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964487#M375615</link>
      <description>&lt;P&gt;Double-ampersands are not necesssary here, unless there are things going on in your code that you haven't mentioned.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 10:00:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964487#M375615</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-04-17T10:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964488#M375616</link>
      <description>&lt;P&gt;'ITT' stands for 'Intend To Treat' population. I forget what 'PP' stands for. I read the terms in some materials about clinical trial dataset before. 'ITT' should be the column name if I remember it right, and has value of "Y" (which flags this subject belongs to ITT population) and "N" (which flags this subject does not belong to ITT population). Mean statistics is calculated base on different populations, sometimes you need to report statistics for all samples(or subjects, participants), other times you need statistics for the ITT population only.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 10:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964488#M375616</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-17T10:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964489#M375617</link>
      <description>&lt;P&gt;PP stands for Per-Protocol analysis population. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 10:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964489#M375617</guid>
      <dc:creator>nsns</dc:creator>
      <dc:date>2025-04-17T10:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964496#M375618</link>
      <description>&lt;P&gt;Hi nsns, thank you for telling me what 'PP' stands for (I don't know what is per protocol analysis population though&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; ), I create a dataset like this and a macro according to what you described, hope this explain part of your problem. Please let me know if it does not solve your question&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*create dataset*/
data weight;
   input subjid weight itt $ pp $;
   datalines;
101 50 y y 
102 55 y y
103 58 y y
104 60 n y
105 66 n y
106 67 y n
107 68 y n
108 70 y n
109 71 y y
110 72 y y
111 80 n y
112 49 y n
112 48 y n
114 49 y y
115 45 y y
;
run;
proc print data=weight;
run;
/*create %let macro to print
dataset for different population*/
%let flag=y;
data weight_itt;
   set weight;
   if itt="&amp;amp;flag";
run;
proc print data=weight_itt;
run;
data weight_pp;
   set weight;
   if pp="&amp;amp;flag";
run;
proc print data=weight_pp;
run;
/*another way to create this macro*/
%macro popset(table,var);
%local table var;
data &amp;amp;table._&amp;amp;var;
   set &amp;amp;table;
   if &amp;amp;var='y';
run;
%mend popset;
%popset(weight,itt);
%popset(weight,pp);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dxiao2017_0-1744888649927.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106299iA523B1D1CF4E7B1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="dxiao2017_0-1744888649927.png" alt="dxiao2017_0-1744888649927.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dxiao2017_1-1744888715616.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106300i2496EA061D1A2C5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="dxiao2017_1-1744888715616.png" alt="dxiao2017_1-1744888715616.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dxiao2017_3-1744888772717.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106302iE2193F42C418A5D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="dxiao2017_3-1744888772717.png" alt="dxiao2017_3-1744888772717.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dxiao2017_4-1744888870598.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106303iD5978977B7B2D513/image-size/large?v=v2&amp;amp;px=999" role="button" title="dxiao2017_4-1744888870598.png" alt="dxiao2017_4-1744888870598.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dxiao2017_5-1744888942134.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106304i5852412D48E3522A/image-size/large?v=v2&amp;amp;px=999" role="button" title="dxiao2017_5-1744888942134.png" alt="dxiao2017_5-1744888942134.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 11:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964496#M375618</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-17T11:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964498#M375619</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/242"&gt;@nsns&lt;/a&gt;&amp;nbsp;I have another question for you: why there is a period (or dot) behind your macro variable &amp;amp;pop (,please see the picture, I marked it out with a red circle)?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106305i9F06BB9AF5F8CD09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;, I am not sure whether the %local statement in my second macro write correctly, could you help confirm it? Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 11:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964498#M375619</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-17T11:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964503#M375620</link>
      <description>&lt;P&gt;Hi, so you solved the problem yourself through adding one more ampersand &amp;amp; before the macro &amp;amp;pop.? And then it is resolved to a value like 'ITT' and 'PP', isn't it&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; , so this macro need to be resolved twice (i.e., double ampersand &amp;amp;&amp;amp; should be applied) into the correct value, and the macro you are using is a big complex nested macro which I cannot imagine what does it look like&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 11:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964503#M375620</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-17T11:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964504#M375621</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/466238"&gt;@dxiao2017&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/242"&gt;@nsns&lt;/a&gt;&amp;nbsp;I have another question for you: why there is a period (or dot) behind your macro variable &amp;amp;pop (,please see the picture, I marked it out with a red circle)?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106305i9F06BB9AF5F8CD09/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;, I am not sure whether the %local statement in my second macro write correctly, could you help confirm it? Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please start a new thread with these questions, as they are not really on topic in this thread.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 11:57:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964504#M375621</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-04-17T11:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964512#M375623</link>
      <description>Thanks for the suggestion Paige! I did not use %local statement in a macro before and do not know whether I use it correctly, in this post I think you can help with my question so I referred to you in this thread. Sorry for it if it looks irrelevant!</description>
      <pubDate>Thu, 17 Apr 2025 13:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964512#M375623</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-17T13:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964513#M375624</link>
      <description>I use a dot when I refer to a macro variable.</description>
      <pubDate>Thu, 17 Apr 2025 14:14:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964513#M375624</guid>
      <dc:creator>nsns</dc:creator>
      <dc:date>2025-04-17T14:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964537#M375627</link>
      <description>&lt;P&gt;Please discard my first %let macro in my last thread (the way I create that %let macro was odd and funny, I don't know what's wrong with my mind then &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;). Here is the right one (and you do not need to use one more ampersand to resolve the macro):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data weight;
   input subjid weight itt $ pp $;
   datalines;
101 50 y y 
102 55 y y
103 58 y y
104 60 n y
105 66 n y
106 67 y n
107 68 y n
108 70 y n
109 71 y y
110 72 y y
111 80 n y
112 49 y n
112 48 y n
114 49 y y
115 45 y y
;
run;
proc print data=weight;
run;
/**create %let macro to print
dataset for different population**/
%let pop=itt;
data weight_&amp;amp;pop;
   set weight;
   if &amp;amp;pop="y";
run;
proc print data=weight_&amp;amp;pop;
run;
%let pop=pp;
data weight_&amp;amp;pop;
   set weight;
   if &amp;amp;pop="y";
run;
proc print data=weight_&amp;amp;pop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dxiao2017_0-1744915376221.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106314i3F50EB538D141CC8/image-size/large?v=v2&amp;amp;px=999" role="button" title="dxiao2017_0-1744915376221.png" alt="dxiao2017_0-1744915376221.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dxiao2017_2-1744915443648.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106316iF34C0EAA003CF555/image-size/large?v=v2&amp;amp;px=999" role="button" title="dxiao2017_2-1744915443648.png" alt="dxiao2017_2-1744915443648.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dxiao2017_3-1744915507991.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106317i17C29F2F6D8AD3BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="dxiao2017_3-1744915507991.png" alt="dxiao2017_3-1744915507991.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 18:47:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964537#M375627</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-17T18:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964539#M375628</link>
      <description>&lt;P&gt;And also I forgot to write the proc print step in the second macro in my previous thread, here is the correction:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro popset(table,var);
%local table var;
data &amp;amp;table._&amp;amp;var;
   set &amp;amp;table;
   if &amp;amp;var='y';
run;
proc print data=&amp;amp;table._&amp;amp;var;
run;
%mend popset;
%popset(weight,itt);
%popset(weight,pp);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Apr 2025 19:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964539#M375628</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-17T19:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964545#M375629</link>
      <description>&lt;P&gt;You do not always need a period (a dot) to resolve a macro, except the macro value only constitutes part of your string then you need a dot to separate the two parts. For examples (I typed code here and run the code in windowing environment 9.4 base, btw&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; and this does not make any difference just somehow want to mention it btw&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let var=employee;
%put Employees resolves to &amp;amp;var.s as it is.;

%let lib=weight;
%let table=itt;
%put The dataset weight.itt resolves to &amp;amp;lib..&amp;amp;table as it is.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.JPG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106320i9C594D57CEA17268/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.JPG" alt="Capture1.JPG" /&gt;&lt;/span&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 19:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964545#M375629</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-17T19:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964548#M375630</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;I agree with you that double ampersand is not needed here, please see details in my other threads, one ampersand can resolve the macro. However, I am curious about how&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/242"&gt;@nsns&lt;/a&gt;&amp;nbsp;use double ampersand to resolve the macro (which obviously resolved twice) and what does the macro look like&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 20:11:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964548#M375630</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-17T20:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964550#M375631</link>
      <description>&lt;P&gt;I would be happy to discuss these macro questions in their own thread. I will not discuss them in this thread, as they have deviated far from the topic of "Running a program for different populations"&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 20:35:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964550#M375631</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-04-17T20:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Running a program for different populations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964573#M375638</link>
      <description>&lt;P&gt;It's okay,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;, you are welcome!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2025 10:06:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-a-program-for-different-populations/m-p/964573#M375638</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-18T10:06:49Z</dc:date>
    </item>
  </channel>
</rss>

