<?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: Brings sets together into one data. (in macro) in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713780#M220259</link>
    <description>&lt;P&gt;it doesn't matter.&lt;/P&gt;
&lt;P&gt;This will take all tables starting with&amp;nbsp; ZM_ .&lt;/P&gt;</description>
    <pubDate>Sun, 24 Jan 2021 23:29:53 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-01-24T23:29:53Z</dc:date>
    <item>
      <title>Brings sets together into one data. (in macro) in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713774#M220253</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="STACKhELP.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53853i2F72B7906B6B3A94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="STACKhELP.png" alt="STACKhELP.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i want to brings sets together into one data in macro. I have 1064 sets like zm_&amp;amp;next_name and i want to brings them into one data for example ----&amp;gt; data CramerSet;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 22:47:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713774#M220253</guid>
      <dc:creator>Piotr900k</dc:creator>
      <dc:date>2021-01-24T22:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Brings sets together into one data. (in macro) in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713776#M220255</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ALL;
&amp;nbsp; set ZM_: ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 Jan 2021 23:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713776#M220255</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-24T23:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Brings sets together into one data. (in macro) in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713778#M220257</link>
      <description>&lt;P&gt;In macro or outside this macro?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 23:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713778#M220257</guid>
      <dc:creator>Piotr900k</dc:creator>
      <dc:date>2021-01-24T23:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Brings sets together into one data. (in macro) in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713780#M220259</link>
      <description>&lt;P&gt;it doesn't matter.&lt;/P&gt;
&lt;P&gt;This will take all tables starting with&amp;nbsp; ZM_ .&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 23:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713780#M220259</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-24T23:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Brings sets together into one data. (in macro) in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713781#M220260</link>
      <description>&lt;P&gt;Ok, I'll check, I have another question. If I have over 1000 sets in one dataset, what should I do to avoid printing those over 1000 sets in the output data?&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 23:43:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713781#M220260</guid>
      <dc:creator>Piotr900k</dc:creator>
      <dc:date>2021-01-24T23:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Brings sets together into one data. (in macro) in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713782#M220261</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/364250"&gt;@Piotr900k&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Ok, I'll check, I have another question. If I have over 1000 sets in one dataset, what should I do to avoid printing those over 1000 sets in the output data?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm afraid you have to describe what you mean by "printing over those 1000 sets".&lt;/P&gt;
&lt;P&gt;If you are referring to a Set statement in a data step there is no "printing over" going on. It is adding records from each data set.&lt;/P&gt;
&lt;P&gt;You can have the same data set on the Set statement multiple times, it just appends the data set each time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 23:55:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713782#M220261</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-24T23:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Brings sets together into one data. (in macro) in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713784#M220263</link>
      <description>&lt;P&gt;What you could do, if that's what you want, is:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;data INPUT/view=INPUT;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;set ZM_: indsname=INDS;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc means data=INPUT;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; class INDS:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; ...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;No macro needed. Process all the tables in one go and create a single output.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 23:59:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713784#M220263</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-24T23:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Brings sets together into one data. (in macro) in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713785#M220264</link>
      <description>&lt;P&gt;I have my macro to change variables, and i want to do one data set which include this changed variables, because i need to calculate v-cramer after&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 00:06:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713785#M220264</guid>
      <dc:creator>Piotr900k</dc:creator>
      <dc:date>2021-01-25T00:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Brings sets together into one data. (in macro) in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713793#M220272</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;I have my macro to change variables, and i want to do one data set which include this changed variables,&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;How about something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set ZM_: (obs=1) indsname=INDS;                                   * get all the table names;
  if INDS ne lag(INDS) ;                                            * one process by table  ;
  VAR=substr(INDS,8); * remove WORK.ZM_ to find the variable name;  * extract the analysis variable nane; 
  call execute(' proc means data='||INDS||' nway; id INDS ; out=SUM q1=q1 q2=q2 q3=q3; var ' || VAR 
             ||';proc append data=SUM base=WANT; run;');            * run statistics;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I suspect the 1000 tables are created from a process that could easily create less of a messy output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 01:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Brings-sets-together-into-one-data-in-macro-in-SAS/m-p/713793#M220272</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-25T01:32:44Z</dc:date>
    </item>
  </channel>
</rss>

