<?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: Create a SAS dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Create-a-SAS-dataset/m-p/318201#M16785</link>
    <description>&lt;P&gt;You use the KEEP statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See below where two datasets are created, one with Name/Age/Sex and second with Name/Weight/Height.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you create the datasets, it's likely you'll want a common variable between the two so you can map back to records if required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class1;
set sashelp.class;

keep name age sex;
run;

data class2;
set sashelp.class;
keep name weight height;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 12 Dec 2016 04:39:43 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-12-12T04:39:43Z</dc:date>
    <item>
      <title>Create a SAS dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Create-a-SAS-dataset/m-p/318189#M16784</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I imported the file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC IMPORT DATAFILE = 'C:\Users\...xlsx' DBMS = XLSX OUT = general&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to make two datasets from general (gss1 and gss2) both consisting of 8 variables when general has 20.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you create a dataset with certain variables from an excel file after you proc import datafile?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 04:05:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Create-a-SAS-dataset/m-p/318189#M16784</guid>
      <dc:creator>tasha89tp</dc:creator>
      <dc:date>2016-12-12T04:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create a SAS dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Create-a-SAS-dataset/m-p/318201#M16785</link>
      <description>&lt;P&gt;You use the KEEP statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See below where two datasets are created, one with Name/Age/Sex and second with Name/Weight/Height.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you create the datasets, it's likely you'll want a common variable between the two so you can map back to records if required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class1;
set sashelp.class;

keep name age sex;
run;

data class2;
set sashelp.class;
keep name weight height;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Dec 2016 04:39:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Create-a-SAS-dataset/m-p/318201#M16785</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-12T04:39:43Z</dc:date>
    </item>
  </channel>
</rss>

