<?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: value statement: missing value in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/value-statement-missing-value/m-p/58723#M16493</link>
    <description>This is great. You are exactly right. I thought just '' should be enough as missing character variable is blank in the dataset. I tried again with the space between quotes and it worked! &lt;BR /&gt;
&lt;BR /&gt;
Agree on the benefit of using Other. There are times when I will need both missing and other. (For example, missing could be "to be assigned" and other could be "typo, please review".&lt;BR /&gt;
&lt;BR /&gt;
Big Thanks!&lt;BR /&gt;
mona</description>
    <pubDate>Sun, 01 Aug 2010 04:33:10 GMT</pubDate>
    <dc:creator>mnew</dc:creator>
    <dc:date>2010-08-01T04:33:10Z</dc:date>
    <item>
      <title>value statement: missing value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/value-statement-missing-value/m-p/58721#M16491</link>
      <description>Hi there. How to refer to missing character variable values in a value statement (e.g. for Proc format)?&lt;BR /&gt;
I have no trouble with using    . = 'missing salary'  when the variable is numeric   ... But could not figure out a way to say: if the value for Gender is missing, format as 'Pls review'. I have tried just using '' but it did not work (no error msg / simply did not recode).&lt;BR /&gt;
Thanks!</description>
      <pubDate>Sat, 31 Jul 2010 19:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/value-statement-missing-value/m-p/58721#M16491</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-07-31T19:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: value statement: missing value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/value-statement-missing-value/m-p/58722#M16492</link>
      <description>Hi:&lt;BR /&gt;
  There's a difference between '' (quote quote) and ' ' (quote space quote) in the definition of a value to which a character format will apply. In addition with any user-defined format, you can use the keyword OTHER to "catch" all the values that do not fit into your categories.&lt;BR /&gt;
 &lt;BR /&gt;
  The program below makes some data with missing values and bad values for the SEX variable from SASHELP.CLASS (using only a subset of rows). Consider the difference between using ' ' (quote space quote) in the format (report #1) and using OTHER in the format (report #2).&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data class;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  if age = 11 then sex = ' ';&lt;BR /&gt;
  if age = 16 then sex = 'Z';&lt;BR /&gt;
run;&lt;BR /&gt;
                 &lt;BR /&gt;
proc format;&lt;BR /&gt;
  value $gend 'M' = 'Male'&lt;BR /&gt;
             'F' = 'Female'&lt;BR /&gt;
             ' ' = 'Please Review';&lt;BR /&gt;
           &lt;BR /&gt;
  value $altgend 'M' = 'Male'&lt;BR /&gt;
                'F' = 'Female'&lt;BR /&gt;
                other = 'Please Review';&lt;BR /&gt;
run;&lt;BR /&gt;
                   &lt;BR /&gt;
** only need to show a small subset;&lt;BR /&gt;
proc sort data=class;&lt;BR /&gt;
  by sex;&lt;BR /&gt;
  where age in(11,12,16);&lt;BR /&gt;
run;&lt;BR /&gt;
                  &lt;BR /&gt;
proc print data=class;&lt;BR /&gt;
  format sex $gend.;&lt;BR /&gt;
  title '1 Using Space in format';&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
proc print data=class;&lt;BR /&gt;
  format sex $altgend.;&lt;BR /&gt;
  title '2 Using OTHER in format';&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Sat, 31 Jul 2010 21:17:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/value-statement-missing-value/m-p/58722#M16492</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-07-31T21:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: value statement: missing value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/value-statement-missing-value/m-p/58723#M16493</link>
      <description>This is great. You are exactly right. I thought just '' should be enough as missing character variable is blank in the dataset. I tried again with the space between quotes and it worked! &lt;BR /&gt;
&lt;BR /&gt;
Agree on the benefit of using Other. There are times when I will need both missing and other. (For example, missing could be "to be assigned" and other could be "typo, please review".&lt;BR /&gt;
&lt;BR /&gt;
Big Thanks!&lt;BR /&gt;
mona</description>
      <pubDate>Sun, 01 Aug 2010 04:33:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/value-statement-missing-value/m-p/58723#M16493</guid>
      <dc:creator>mnew</dc:creator>
      <dc:date>2010-08-01T04:33:10Z</dc:date>
    </item>
  </channel>
</rss>

