<?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: data step in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/243869#M55985</link>
    <description>&lt;P&gt;This example may help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data teams;&lt;BR /&gt;input team$;&lt;BR /&gt;cards;&lt;BR /&gt;TeamA&lt;BR /&gt;TeamA&lt;BR /&gt;TeamA&lt;BR /&gt;TeamB&lt;BR /&gt;TeamB&lt;BR /&gt;TeamB&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set teams;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; by team;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if first.team then do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute("data "||team||";");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute ("set teams (where=(team ='"||strip(team)||"')); run;");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jan 2016 18:25:06 GMT</pubDate>
    <dc:creator>Steelers_In_DC</dc:creator>
    <dc:date>2016-01-15T18:25:06Z</dc:date>
    <item>
      <title>data step</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/243623#M55966</link>
      <description>&lt;P&gt;I am creating multiple datasets from one dataset using the following code. Do I have list all the 23 dataset names. Is ther way like a1-a23 (this didnot work) i can use to simplify. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a1 a2 a3 a4 a5 a6 a7 to a23;&lt;/P&gt;&lt;P&gt;set b;&lt;/P&gt;&lt;P&gt;if then do;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;output a1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:27:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/243623#M55966</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-01-14T22:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/243624#M55967</link>
      <description>&lt;P&gt;If you want to do it that way, then yes you do have to list it out. There are other ways, but the general advice is don't do this.&lt;/P&gt;
&lt;P&gt;Your posted code isn't correct, but I'm assuming you have more data somewhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2015/01/26/how-to-split-one-data-set-into-many/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2015/01/26/how-to-split-one-data-set-into-many/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/Split_Data_into_Subsets" target="_blank"&gt;http://www.sascommunity.org/wiki/Split_Data_into_Subsets&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:32:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/243624#M55967</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-01-14T22:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/243625#M55968</link>
      <description>&lt;P&gt;Unfortunately what you are doing pretty much requires an exact list.&lt;/P&gt;
&lt;P&gt;There are some methods to generate lists. One might ask the need for splitting one data set that many ways. Since you are going to have 23 conditions to output the data I wouldn't worry so much about this list of sets.&lt;/P&gt;
&lt;P&gt;It may be that your later data processing could use the concept of BY where it will do the same thing for each value of a variable in your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 22:34:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/243625#M55968</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-01-14T22:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/243869#M55985</link>
      <description>&lt;P&gt;This example may help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data teams;&lt;BR /&gt;input team$;&lt;BR /&gt;cards;&lt;BR /&gt;TeamA&lt;BR /&gt;TeamA&lt;BR /&gt;TeamA&lt;BR /&gt;TeamB&lt;BR /&gt;TeamB&lt;BR /&gt;TeamB&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; set teams;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; by team;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if first.team then do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute("data "||team||";");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute ("set teams (where=(team ='"||strip(team)||"')); run;");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 18:25:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/243869#M55985</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2016-01-15T18:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: data step</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/244019#M55993</link>
      <description>You could use a macro approach with %do loops to generate data set nsmed and logic dynamic.&lt;BR /&gt;But I agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; that splitting data usually is not benificial. Reporting and statistical analysis is supported best by bringing data together,  not splitting them apart.</description>
      <pubDate>Sat, 16 Jan 2016 21:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-step/m-p/244019#M55993</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-01-16T21:42:05Z</dc:date>
    </item>
  </channel>
</rss>

