<?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 How to retain all observationa in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749806#M235706</link>
    <description>Hi&lt;BR /&gt;I have data..&lt;BR /&gt;Data new;&lt;BR /&gt;input id ba&lt;BR /&gt;Cards;&lt;BR /&gt;101&lt;BR /&gt;101&lt;BR /&gt;101&lt;BR /&gt;101&lt;BR /&gt;101 5&lt;BR /&gt;102&lt;BR /&gt;102&lt;BR /&gt;102&lt;BR /&gt;102 9&lt;BR /&gt;&lt;BR /&gt;So I need to retain all obs with last value of I'd can anyone help me how to do&lt;BR /&gt;</description>
    <pubDate>Wed, 23 Jun 2021 07:46:37 GMT</pubDate>
    <dc:creator>sasuser123123</dc:creator>
    <dc:date>2021-06-23T07:46:37Z</dc:date>
    <item>
      <title>How to retain all observationa</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749806#M235706</link>
      <description>Hi&lt;BR /&gt;I have data..&lt;BR /&gt;Data new;&lt;BR /&gt;input id ba&lt;BR /&gt;Cards;&lt;BR /&gt;101&lt;BR /&gt;101&lt;BR /&gt;101&lt;BR /&gt;101&lt;BR /&gt;101 5&lt;BR /&gt;102&lt;BR /&gt;102&lt;BR /&gt;102&lt;BR /&gt;102 9&lt;BR /&gt;&lt;BR /&gt;So I need to retain all obs with last value of I'd can anyone help me how to do&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jun 2021 07:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749806#M235706</guid>
      <dc:creator>sasuser123123</dc:creator>
      <dc:date>2021-06-23T07:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to retain all observationa</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749827#M235720</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Please paste you code using the appropriate icon.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And show us your expected output.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 11:07:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749827#M235720</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-06-23T11:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to retain all observationa</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749829#M235722</link>
      <description>&lt;PRE&gt; 72         
 73         Data new;
 74         input id ba
 75         Cards;
 76         101
            ___
            180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 77         101
 78         101
 79         101
 80         101 5
 81         102
 82         102
 83         102
 84         102 9
 85         
 86         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 87         ODS HTML CLOSE;
 88         &amp;amp;GRAPHTERM; ;*';*";*/;RUN;
 
 ERROR: No DATALINES or INFILE statement.
 NOTE: The SAS System stopped processing this step because of errors.
 WARNING: The data set WORK.NEW may be incomplete.  When this step was stopped there were 0 observations and 3 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.00 seconds
       cpu time            0.00 seconds
&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Jun 2021 11:31:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749829#M235722</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-23T11:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to retain all observationa</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749833#M235723</link>
      <description>&lt;P&gt;Taking a guess at what you hope to achieve ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This program would move in the right direction, by selecting observations with a nonmissing value for BA:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set new;
   where ba &amp;gt; .;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And this program would take it a step further, selecting just the last such observation for each ID:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set new;
   where ba &amp;gt; .;
   by id;
   if last.id;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Jun 2021 11:52:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749833#M235723</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-06-23T11:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to retain all observationa</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749945#M235793</link>
      <description>&lt;P&gt;If you want to read all observations, update your code as follows&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data new;
input id ba;
infile datalines missover;
datalines;
101 
101 
101 
101 
101 5
102 
102 
102 
102 9
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Jun 2021 18:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-retain-all-observationa/m-p/749945#M235793</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-06-23T18:45:25Z</dc:date>
    </item>
  </channel>
</rss>

