<?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: Deleting blank observations in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606824#M8370</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Did you really mean to keep missing value between .A and .Z by using VALUE &amp;gt; . in where clause instead of NOT MISSING(VALUE) or VALUE &amp;gt; .Z?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Thanks, but don't worry,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; In my professional programs I would of course use one of these bulletproof criteria and I had considered it here as well. But in a response to a "New User" who appears to be struggling with the very basics of SAS I decided to keep the code as simple as possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, it is not even clear that the OP would really want to delete observations containing a &lt;EM&gt;special&lt;/EM&gt; missing value (which might constitute a valuable piece of information). My understanding was that the missing data in question just indicated the end of a series of values. After all, according to the initial post the data came "&lt;SPAN&gt;from an excel file which has a different number of observations in each column."&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Nov 2019 16:56:41 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2019-11-24T16:56:41Z</dc:date>
    <item>
      <title>Deleting blank observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606747#M8365</link>
      <description>How to delete blank observations in data table without deleting entire row? I got the data from an excel file which has a different number of observations in each column. So, how do I delete the blank observations without deleting the data in the same row but different column?&lt;BR /&gt;&lt;BR /&gt;For a visual..&lt;BR /&gt;&lt;BR /&gt;A B C&lt;BR /&gt;&lt;BR /&gt;48 24 23&lt;BR /&gt;64 50 27&lt;BR /&gt;53 18 28&lt;BR /&gt;53 48 59&lt;BR /&gt;38 18&lt;BR /&gt;49&lt;BR /&gt;&lt;BR /&gt;If A= ‘ ‘ Then Delete;&lt;BR /&gt;&lt;BR /&gt;is deleting the last two observation for B and the last observation for C&lt;BR /&gt;&lt;BR /&gt;I need to just delete the blank observations</description>
      <pubDate>Sun, 24 Nov 2019 00:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606747#M8365</guid>
      <dc:creator>Granny</dc:creator>
      <dc:date>2019-11-24T00:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting blank observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606748#M8366</link>
      <description>Edit: I meant if I do&lt;BR /&gt;&lt;BR /&gt;If C=‘ ‘ then Delete;&lt;BR /&gt;&lt;BR /&gt;The last 2 observations for A and last observation for B are getting deleted</description>
      <pubDate>Sun, 24 Nov 2019 00:52:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606748#M8366</guid>
      <dc:creator>Granny</dc:creator>
      <dc:date>2019-11-24T00:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting blank observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606749#M8367</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/300932"&gt;@Granny&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;How to delete blank observations in data table without deleting entire row? I got the data from an excel file which has a different number of observations in each column. So, how do I delete the blank observations without deleting the data in the same row but different column?&lt;BR /&gt;&lt;BR /&gt;For a visual..&lt;BR /&gt;&lt;BR /&gt;A B C&lt;BR /&gt;&lt;BR /&gt;48 24 23&lt;BR /&gt;64 50 27&lt;BR /&gt;53 18 28&lt;BR /&gt;53 48 59&lt;BR /&gt;38 18&lt;BR /&gt;49&lt;BR /&gt;&lt;BR /&gt;If A= ‘ ‘ Then Delete;&lt;BR /&gt;&lt;BR /&gt;is deleting the last two observation for B and the last observation for C&lt;BR /&gt;&lt;BR /&gt;I need to just delete the blank observations&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In your example, you cannot delete the blank value of C unless you want to delete the entire row. That's how SAS works.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 00:56:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606749#M8367</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-24T00:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting blank observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606809#M8368</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/300932"&gt;@Granny&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A "long" data structure might be more suitable for your data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input A B C;
cards;
48 24 23
64 50 27
53 18 28
53 48 59
38 18 .
49 .  .
;

proc transpose data=have out=trans;
run;

proc transpose data=trans
               out=want(rename=(_name_=col col1=value) where=(value&amp;gt;.));
by _name_;
run;

proc print data=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you have 6 observations for A, 5 for B and 4 for C, as desired, no missing values and a data structure that is useful for many purposes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/300932"&gt;@Granny&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;If A= ‘ ‘ Then Delete;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You know that a blank (&lt;FONT face="courier new,courier"&gt;' '&lt;/FONT&gt;) represents a missing &lt;EM&gt;character&lt;/EM&gt; value, whereas standard missing &lt;EM&gt;numeric&lt;/EM&gt; values are represented by a period (&lt;FONT face="courier new,courier"&gt;.&lt;/FONT&gt;)?&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 11:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606809#M8368</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-11-24T11:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting blank observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606818#M8369</link>
      <description>&lt;P&gt;Did you really mean to keep missing value between .A and .Z by using VALUE &amp;gt; . in where clause instead of NOT MISSING(VALUE) or VALUE &amp;gt; .Z?&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 15:28:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606818#M8369</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-24T15:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting blank observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606824#M8370</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Did you really mean to keep missing value between .A and .Z by using VALUE &amp;gt; . in where clause instead of NOT MISSING(VALUE) or VALUE &amp;gt; .Z?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Thanks, but don't worry,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; In my professional programs I would of course use one of these bulletproof criteria and I had considered it here as well. But in a response to a "New User" who appears to be struggling with the very basics of SAS I decided to keep the code as simple as possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, it is not even clear that the OP would really want to delete observations containing a &lt;EM&gt;special&lt;/EM&gt; missing value (which might constitute a valuable piece of information). My understanding was that the missing data in question just indicated the end of a series of values. After all, according to the initial post the data came "&lt;SPAN&gt;from an excel file which has a different number of observations in each column."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2019 16:56:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/606824#M8370</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-11-24T16:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting blank observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/607155#M8390</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/300932"&gt;@Granny&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;How to delete blank observations in data table without deleting entire row? I got the data from an excel file which has a different number of observations in each column. So, how do I delete the blank observations without deleting the data in the same row but different column?&lt;BR /&gt;&lt;BR /&gt;For a visual..&lt;BR /&gt;&lt;BR /&gt;A B C&lt;BR /&gt;&lt;BR /&gt;48 24 23&lt;BR /&gt;64 50 27&lt;BR /&gt;53 18 28&lt;BR /&gt;53 48 59&lt;BR /&gt;38 18&lt;BR /&gt;49&lt;BR /&gt;&lt;BR /&gt;If A= ‘ ‘ Then Delete;&lt;BR /&gt;&lt;BR /&gt;is deleting the last two observation for B and the last observation for C&lt;BR /&gt;&lt;BR /&gt;I need to just delete the blank observations&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please be aware that the message windows on this forum will seriously reformat text with "blanks". To maintain any appearance with blanks then you should open a code box using the forum's {I} icon and paste there. From your text I have to assume that your actually have some data that looks more like:&lt;/P&gt;
&lt;PRE&gt;A  B  C
48 24 23
64 50 27
53 18 28
53 48 59
   38 18
      49&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 00:14:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Deleting-blank-observations/m-p/607155#M8390</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-26T00:14:03Z</dc:date>
    </item>
  </channel>
</rss>

