<?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: where statement with missing char data points in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345249#M79397</link>
    <description>&lt;P&gt;When I try either of those I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: No observations were selected from data set HI.STUDENT.&lt;BR /&gt;NOTE: There were 0 observations read from the data set HI.STUDENT.&lt;BR /&gt;WHERE Char_DOB=' ';&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or same for the missing function.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2017 03:32:50 GMT</pubDate>
    <dc:creator>larkjr18</dc:creator>
    <dc:date>2017-03-29T03:32:50Z</dc:date>
    <item>
      <title>where statement with missing char data points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345243#M79394</link>
      <description>&lt;P&gt;Trying to print out the 3 variables when Char_DOB is = to a . in the data sets. (it is invalid so that's why its blank)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;anyways I get&lt;BR /&gt;573 where Char_DOB=.;&lt;BR /&gt;ERROR: WHERE clause operator requires compatible variables.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I run the proc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=hi.student;&lt;BR /&gt;where Char_DOB=.;&lt;BR /&gt;var SSN Total_DOB Char_DOB;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 03:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345243#M79394</guid>
      <dc:creator>larkjr18</dc:creator>
      <dc:date>2017-03-29T03:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with missing char data points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345248#M79396</link>
      <description>&lt;P&gt;Empty for a character variable is a space.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The MISSING() function works for either numeric or character fields.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where missing(char_dob);&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 03:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345248#M79396</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-29T03:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with missing char data points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345249#M79397</link>
      <description>&lt;P&gt;When I try either of those I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: No observations were selected from data set HI.STUDENT.&lt;BR /&gt;NOTE: There were 0 observations read from the data set HI.STUDENT.&lt;BR /&gt;WHERE Char_DOB=' ';&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or same for the missing function.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 03:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345249#M79397</guid>
      <dc:creator>larkjr18</dc:creator>
      <dc:date>2017-03-29T03:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with missing char data points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345250#M79398</link>
      <description>&lt;P&gt;Are you sure you have missing values then?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 03:36:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345250#M79398</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-29T03:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with missing char data points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345251#M79399</link>
      <description>&lt;P&gt;The Char_DOB has invalid dates which arent showing and they are the observations I want to show.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 03:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345251#M79399</guid>
      <dc:creator>larkjr18</dc:creator>
      <dc:date>2017-03-29T03:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with missing char data points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345252#M79400</link>
      <description>&lt;P&gt;Please show a proc contents for the dataset, an image of your invalid data and the code and log.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 03:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345252#M79400</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-29T03:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with missing char data points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345255#M79403</link>
      <description>&lt;P&gt;Seems that you are not telling us the full story. Since it's a char variable, no values can be seen as invalid from data storage perspective. An invalid date stored as char won't necessary be missing.&lt;/P&gt;
&lt;P&gt;Or, if you have moved a date value from a numeric column using a date format, then you might end up with the char '.' (which is not missing for char variable).&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 04:32:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345255#M79403</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-03-29T04:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with missing char data points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345421#M79465</link>
      <description>&lt;P&gt;Here is my full code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname hi&lt;BR /&gt;'C:\Users\larkj\Desktop';&lt;BR /&gt;proc format library = hi;&lt;BR /&gt;value season&lt;BR /&gt;1='Fall' 2='Spring' 3='Summer';&lt;BR /&gt;value $sx&lt;BR /&gt;'M'='Male' 'F'='Female';&lt;BR /&gt;value race&lt;BR /&gt;.='Missing' 2='Hispanic' 3='Puerto Rican'&lt;BR /&gt;4='Mexican American' 5='Asian American'&lt;BR /&gt;6='Caucasian' 7='American Indian' 8='African American'&lt;BR /&gt;9='Other';&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;options fmtsearch=(hi);&lt;BR /&gt;data hi.student (drop=i);&lt;BR /&gt;infile 'C:\Users\larkj\Desktop\STUDENT.DAT';&lt;BR /&gt;input ssn 1-9 sex $ 11 term 17 type $ 19 div $ 21-24&lt;BR /&gt;major 26-30 ed $ 32 state $ 34-35 sat 37-40 satm 42-44&lt;BR /&gt;satv 46-48 gpa 50-53 rank 55-58 act 60-63 toefl 65-68&lt;BR /&gt;honor $ 70 ethnic 72 year_dob 101-102 month_dob 103-104&lt;BR /&gt;day_dob 105-106&lt;BR /&gt;;&lt;BR /&gt;Char_DOB = input(catx("/", month_dob, day_dob, year_dob),?? mmddyy8.);&lt;BR /&gt;Total_DOB = input(catx("/", month_dob, day_dob, year_dob),?? mmddyy8.);&lt;BR /&gt;if ((month_dob = 02) AND (day_dob= 29)) then Total_DOB = mdy(03,01,year_dob)-1;&lt;BR /&gt;else Total_DOB = mdy(month_dob,15,year_dob);&lt;BR /&gt;format Total_DOB mmddyy8.&lt;BR /&gt;term Season.&lt;BR /&gt;sex $Sx.&lt;BR /&gt;ethnic Race.;&lt;BR /&gt;array change (6) gpa sat satm satv act toefl;&lt;BR /&gt;do i = 1 TO 6;&lt;BR /&gt;if change(i) = 0 then change(i) = .;&lt;BR /&gt;end;&lt;BR /&gt;Char_DOBc = put(Char_DOB,mmddyy8.);&lt;BR /&gt;drop Char_DOB;&lt;BR /&gt;rename Char_DOBc = Char_DOB;&lt;BR /&gt;run;&lt;BR /&gt;PROC CONTENTS DATA=hi.student;&lt;BR /&gt;RUN;&lt;BR /&gt;proc print data=hi.student;&lt;BR /&gt;format term Season. sex $Sx. ethnic Race. Total_DOB mmddyy8. ;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=hi.student;&lt;BR /&gt;where Char_DOB= ' ';&lt;BR /&gt;var SSN Total_DOB Char_DOB;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 15:39:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-statement-with-missing-char-data-points/m-p/345421#M79465</guid>
      <dc:creator>larkjr18</dc:creator>
      <dc:date>2017-03-29T15:39:19Z</dc:date>
    </item>
  </channel>
</rss>

