<?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: keep data subset for merging in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551179#M7390</link>
    <description>Thank you! It works now!</description>
    <pubDate>Mon, 15 Apr 2019 18:28:50 GMT</pubDate>
    <dc:creator>RebeccaJW</dc:creator>
    <dc:date>2019-04-15T18:28:50Z</dc:date>
    <item>
      <title>keep data subset for merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551158#M7383</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem about subsetting data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to keep the observations where the variable A equals to "speech" from a dataset. Then I need to merge this new dataset with another dataset and keep the observations that are in both datasets.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is appreciated if anyone can help me. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 17:51:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551158#M7383</guid>
      <dc:creator>RebeccaJW</dc:creator>
      <dc:date>2019-04-15T17:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: keep data subset for merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551166#M7385</link>
      <description>Which step are you having problems with? It would probably help if you showed the code you tried with an explanation of what isn't working. You may need to provide sample data, but starting with the code is a good first step.</description>
      <pubDate>Mon, 15 Apr 2019 18:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551166#M7385</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-15T18:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: keep data subset for merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551167#M7386</link>
      <description>&lt;P&gt;Sounds like you know what to do.&lt;/P&gt;
&lt;P&gt;Post the code you created for each of those steps and if it generates errors the log from your attempt to run it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember to use the Insert Code button {i} on the gui to get a pop-up window to paste/edit the lines from the log. Otherwise the forum editor will re-flow the lines and make the log harder to read.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 18:12:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551167#M7386</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-15T18:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: keep data subset for merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551171#M7387</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data orig;
	infile "/home/Projects/Project2/A/B_clean.csv" dsd missover firstobs=2;
	informat title name $10000. date MMDDYY10. ;
	format date DDMMYY10.;
    input title name date;
    
    if title = "NEW" then date = '31OCT12010'd;
    if title = "OLD" then date = '15JUN2008'd;	

run;

data orig.sub;
	set orig;
	where name="speech";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is what I have written. The first part works well, but in the orig.sub step, there is an error shown below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: Libref ORIG is not assigned.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for replying!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 18:21:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551171#M7387</guid>
      <dc:creator>RebeccaJW</dc:creator>
      <dc:date>2019-04-15T18:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: keep data subset for merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551172#M7388</link>
      <description>&lt;P&gt;Names cannot contain periods.&amp;nbsp; By using ORIG.SUB you told SAS to create a dataset named SUB in library pointed to by the libref ORIG.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Names can use letter, digits and underscores.&amp;nbsp; They must NOT start with a digit.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 18:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551172#M7388</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-15T18:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: keep data subset for merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551178#M7389</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data &lt;FONT size="3" color="#FF0000"&gt;&lt;STRONG&gt;orig.sub;&lt;/STRONG&gt;&lt;/FONT&gt;
	set orig;
	where name="speech";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Did you create the ORIG library?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If not, just remove that portion of the name or declare the library first. The remainder of your code looks fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 18:28:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551178#M7389</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-15T18:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: keep data subset for merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551179#M7390</link>
      <description>Thank you! It works now!</description>
      <pubDate>Mon, 15 Apr 2019 18:28:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551179#M7390</guid>
      <dc:creator>RebeccaJW</dc:creator>
      <dc:date>2019-04-15T18:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: keep data subset for merging</title>
      <link>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551180#M7391</link>
      <description>Thank you for replying! It works now!</description>
      <pubDate>Mon, 15 Apr 2019 18:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/keep-data-subset-for-merging/m-p/551180#M7391</guid>
      <dc:creator>RebeccaJW</dc:creator>
      <dc:date>2019-04-15T18:29:18Z</dc:date>
    </item>
  </channel>
</rss>

