<?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: Delete all rows up to the first Non-missing row in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Delete-all-rows-up-to-the-first-Non-missing-row/m-p/798476#M313899</link>
    <description>&lt;P&gt;One option&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want(drop=_:);
  set have;
  retain _del_flg 1;
  if _del_flg then 
    do;
      _del_flg=missing(v1);
      if _del_flg then delete;
    end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 24 Feb 2022 23:55:09 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2022-02-24T23:55:09Z</dc:date>
    <item>
      <title>Delete all rows up to the first Non-missing row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-all-rows-up-to-the-first-Non-missing-row/m-p/798475#M313898</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;My data have few &lt;U&gt;first&lt;/U&gt; rows with missing data. How can I delete them?&lt;/P&gt;
&lt;P&gt;There are other missing but inside the good data and I need to keep those missing.&lt;/P&gt;
&lt;P&gt;In the data below, I want to delete row row 1 and 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have; 
input n v1;
datalines;
1 . 
2 . 
3 4 
4 66
5 .
6 66
7 3
8 .
9 8
;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 23:46:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-all-rows-up-to-the-first-Non-missing-row/m-p/798475#M313898</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2022-02-24T23:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all rows up to the first Non-missing row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-all-rows-up-to-the-first-Non-missing-row/m-p/798476#M313899</link>
      <description>&lt;P&gt;One option&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want(drop=_:);
  set have;
  retain _del_flg 1;
  if _del_flg then 
    do;
      _del_flg=missing(v1);
      if _del_flg then delete;
    end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Feb 2022 23:55:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-all-rows-up-to-the-first-Non-missing-row/m-p/798476#M313899</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-02-24T23:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all rows up to the first Non-missing row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-all-rows-up-to-the-first-Non-missing-row/m-p/798490#M313912</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;It works nicely.&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 01:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-all-rows-up-to-the-first-Non-missing-row/m-p/798490#M313912</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2022-02-25T01:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Delete all rows up to the first Non-missing row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-all-rows-up-to-the-first-Non-missing-row/m-p/798592#M313962</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/49486"&gt;@hhchenfx&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;My data have few &lt;U&gt;first&lt;/U&gt; rows with missing data. How can I delete them?&lt;/P&gt;
&lt;P&gt;There are other missing but inside the good data and I need to keep those missing.&lt;/P&gt;
&lt;P&gt;In the data below, I want to delete row row 1 and 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have; 
input n v1;
datalines;
1 . 
2 . 
3 4 
4 66
5 .
6 66
7 3
8 .
9 8
;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I suggest that perhaps you want to look at how you READ that data into SAS. Especially if you are reading multiple files and keep having these missing rows appear and the number is the same.&lt;/P&gt;
&lt;P&gt;If you already know the number of missing rows, such as&lt;STRONG&gt; 2&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;data want;
   set have (firstobs=3);
run;&lt;/PRE&gt;
&lt;P&gt;The firstobs option says to keep the observations starting with the 3rd one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 15:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-all-rows-up-to-the-first-Non-missing-row/m-p/798592#M313962</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-02-25T15:38:34Z</dc:date>
    </item>
  </channel>
</rss>

