<?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: help with creating a dataset or table in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75851#M22019</link>
    <description>Hi,&lt;BR /&gt;
in my view first prepare the dataset first ( sdata).&lt;BR /&gt;
later&lt;BR /&gt;
&lt;BR /&gt;
data maledataset  femaledataset;&lt;BR /&gt;
set sdata;&lt;BR /&gt;
if gender eq "F" then output femaledataset;&lt;BR /&gt;
else if gender eq "M" then output maledataset;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* it would create one for male and another for female.*/&lt;BR /&gt;
&lt;BR /&gt;
hope it may help you</description>
    <pubDate>Mon, 02 Mar 2009 15:51:01 GMT</pubDate>
    <dc:creator>ssas</dc:creator>
    <dc:date>2009-03-02T15:51:01Z</dc:date>
    <item>
      <title>help with creating a dataset or table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75849#M22017</link>
      <description>I have data which contains list of people with their sex, age and the country they moved from and the state they moved to:&lt;BR /&gt;
&lt;BR /&gt;
NAME               AGE       SEX         FROM            TO &lt;BR /&gt;
John Smith         25           M            Canada           Maryland&lt;BR /&gt;
Mary Fernandez  4            F             Spain              Illinois&lt;BR /&gt;
etc.&lt;BR /&gt;
&lt;BR /&gt;
I need 2 datasets (one for males and one for females) for  each US state: &lt;BR /&gt;
&lt;BR /&gt;
In these datasets there should be numbers of people moving to the particular state totalled per foreign country by sex and age.&lt;BR /&gt;
&lt;BR /&gt;
For example I should be able to look at the Maryland (male) table and see that 12 men aged 36 moved there from Canada for example. &lt;BR /&gt;
&lt;BR /&gt;
Anyone have any idea how I can do this or even get started? I am not a programmer and I am stuck. Thanks! &lt;BR /&gt;
&lt;BR /&gt;
mu

Message was edited by: michaelaunsworth</description>
      <pubDate>Fri, 27 Feb 2009 19:46:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75849#M22017</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-27T19:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: help with creating a dataset or table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75850#M22018</link>
      <description>Use PROC FREQ and output the table to a dataset, then split the dataset (or run FREQ twice, once for men and once for women; men shown below):  &lt;BR /&gt;
&lt;BR /&gt;
PROC FREQ DATA=mydata(WHERE=(sex='M'));&lt;BR /&gt;
  TABLES to*from*age/out=males;&lt;BR /&gt;
  RUN;</description>
      <pubDate>Fri, 27 Feb 2009 21:14:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75850#M22018</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2009-02-27T21:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: help with creating a dataset or table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75851#M22019</link>
      <description>Hi,&lt;BR /&gt;
in my view first prepare the dataset first ( sdata).&lt;BR /&gt;
later&lt;BR /&gt;
&lt;BR /&gt;
data maledataset  femaledataset;&lt;BR /&gt;
set sdata;&lt;BR /&gt;
if gender eq "F" then output femaledataset;&lt;BR /&gt;
else if gender eq "M" then output maledataset;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* it would create one for male and another for female.*/&lt;BR /&gt;
&lt;BR /&gt;
hope it may help you</description>
      <pubDate>Mon, 02 Mar 2009 15:51:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75851#M22019</guid>
      <dc:creator>ssas</dc:creator>
      <dc:date>2009-03-02T15:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: help with creating a dataset or table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75852#M22020</link>
      <description>Thanks Doc, the HTML output is exactly what I was looking for&lt;BR /&gt;
&lt;BR /&gt;
Other than cutting and pasting, is there any way of getting the tables in the HTML output into either a SAS dataset or an excel dataset?</description>
      <pubDate>Mon, 02 Mar 2009 19:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75852#M22020</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-02T19:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: help with creating a dataset or table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75853#M22021</link>
      <description>One approach to getting the output into a dataset or export is to use ODS.  You can create/output/manipulate pretty much anything you can print from a procedure.  You'll need to read a good bit of documentation or BBUs to become proficient, but the results can be quite useful.</description>
      <pubDate>Mon, 02 Mar 2009 22:13:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-with-creating-a-dataset-or-table/m-p/75853#M22021</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2009-03-02T22:13:03Z</dc:date>
    </item>
  </channel>
</rss>

