<?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: Handling missing character variables in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Handling-missing-character-variables/m-p/43502#M5099</link>
    <description>Hi Linus,&lt;BR /&gt;
Thanks for your message. I think I understood your solution for strings manipluation, which is interesting.&lt;BR /&gt;
Regards,&lt;BR /&gt;
Ramin</description>
    <pubDate>Tue, 02 Sep 2008 19:56:05 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-09-02T19:56:05Z</dc:date>
    <item>
      <title>Handling missing character variables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Handling-missing-character-variables/m-p/43500#M5097</link>
      <description>How can we distinguish a " " (blank) value with a null (missing) value for a character variable. Suppose I have a field in my input file with a field that can accept blank as a valid value:&lt;BR /&gt;
&lt;BR /&gt;
Comma Delimited&lt;BR /&gt;
Name (length = 20),	At 25 Salary, Flag, Date of Birth (DDMntYY format),&lt;BR /&gt;
Joe Williams,        70000, ,17Apr80&lt;BR /&gt;
David Coleman,       91000,Y,29Nov70&lt;BR /&gt;
Terrin Larson,       65000,F,01Jan00&lt;BR /&gt;
Mathew Richardson,   85000,,02May78&lt;BR /&gt;
&lt;BR /&gt;
There are number of missing values in this file. The last record has a missing value for the field "Flag", but the first record has a " " (blank) and valid value for this field. How can one read this file and capture the missing value distinguished from " " value?&lt;BR /&gt;
&lt;BR /&gt;
I tried the below code for handling the subsequent ",". But don`t know how to know that the first record has a valid " " value for flag and the last record does not.&lt;BR /&gt;
&lt;BR /&gt;
data MyLib.EmployeesWithFlag;&lt;BR /&gt;
infile EmpFile dlm=',' firstobs=3 MissOver DSD;&lt;BR /&gt;
length name $ 20.;&lt;BR /&gt;
input name salary flag $ DoB Date7.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance for your taking time on this question.&lt;BR /&gt;
Ramin</description>
      <pubDate>Tue, 02 Sep 2008 12:01:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Handling-missing-character-variables/m-p/43500#M5097</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-09-02T12:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Handling missing character variables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Handling-missing-character-variables/m-p/43501#M5098</link>
      <description>I see your point. But if you want to store your flag as a character value, SAS does NOT distinguish between blank an MISSING/NULL, it's the same. In this case, would you consider to store any other value for your valid blank data?&lt;BR /&gt;
&lt;BR /&gt;
If so, consider to read your whole record into one long string, and then use SAS character functions to find out if there is a blank or not between your delimeters.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Linus</description>
      <pubDate>Tue, 02 Sep 2008 12:14:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Handling-missing-character-variables/m-p/43501#M5098</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-09-02T12:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Handling missing character variables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Handling-missing-character-variables/m-p/43502#M5099</link>
      <description>Hi Linus,&lt;BR /&gt;
Thanks for your message. I think I understood your solution for strings manipluation, which is interesting.&lt;BR /&gt;
Regards,&lt;BR /&gt;
Ramin</description>
      <pubDate>Tue, 02 Sep 2008 19:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Handling-missing-character-variables/m-p/43502#M5099</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-09-02T19:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Handling missing character variables</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Handling-missing-character-variables/m-p/43503#M5100</link>
      <description>I do not know whether I understand your question or not,  I think it is the case to distinguish the space in the name and missing value. So why not use : modifier</description>
      <pubDate>Wed, 03 Sep 2008 02:25:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Handling-missing-character-variables/m-p/43503#M5100</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-09-03T02:25:48Z</dc:date>
    </item>
  </channel>
</rss>

