<?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 PROC FORMAT - Missing Values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292087#M60567</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created the PROC Format below which i thought would capture all scenarios but my output is getting a value for '.'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea why please&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;value ppd&lt;BR /&gt; LOW - 0 = "UTD"&lt;BR /&gt; 0 &amp;lt;-1 = "LT 1 PPD"&lt;BR /&gt; 1 &amp;lt;-2 = "1 PPD"&lt;BR /&gt; 2 &amp;lt;-3 = "2 PPD"&lt;BR /&gt; 3 &amp;lt;- HIGH = "3+ PPD";&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2016 08:08:33 GMT</pubDate>
    <dc:creator>anonymous_user</dc:creator>
    <dc:date>2016-08-17T08:08:33Z</dc:date>
    <item>
      <title>PROC FORMAT - Missing Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292087#M60567</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have created the PROC Format below which i thought would capture all scenarios but my output is getting a value for '.'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea why please&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;value ppd&lt;BR /&gt; LOW - 0 = "UTD"&lt;BR /&gt; 0 &amp;lt;-1 = "LT 1 PPD"&lt;BR /&gt; 1 &amp;lt;-2 = "1 PPD"&lt;BR /&gt; 2 &amp;lt;-3 = "2 PPD"&lt;BR /&gt; 3 &amp;lt;- HIGH = "3+ PPD";&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 08:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292087#M60567</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2016-08-17T08:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT - Missing Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292090#M60569</link>
      <description>&lt;P&gt;You either need to name a specific label for missing values&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;. = 'Missing'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or use OTHER as range to "catch" all values that have not been covered by your ranges:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;OTHER = 'Everything else'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 08:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292090#M60569</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-08-17T08:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT - Missing Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292092#M60570</link>
      <description>&lt;P&gt;Thanks, but I would have thought that the ranges specified would cover them all off so I wouldn't expect any missing values.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 08:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292092#M60570</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2016-08-17T08:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT - Missing Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292100#M60574</link>
      <description>&lt;P&gt;Although a missing value is considered smaller than any other numeric value in comparisons, it is not included in a range that starts with low. That only covers non-missing values. Your intention is probably met best by doing this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input inval;
cards;
.
-1
0
1
2
3
4
;
run;

proc format library=work;
value ppd
  .,LOW - 0 = "UTD"
  0 &amp;lt;- 1 = "LT 1 PPD"
  1 &amp;lt;- 2 = "1 PPD"
  2 &amp;lt;- 3 = "2 PPD"
  3 &amp;lt;- HIGH = "3+ PPD"
;
run;

data want;
set have;
outval = put(inval,ppd.);
run;

proc print noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;PRE&gt;inval    outval

   .     UTD     
  -1     UTD     
   0     UTD     
   1     LT 1 PPD
   2     1 PPD   
   3     2 PPD   
   4     3+ PPD  
&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Aug 2016 08:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292100#M60574</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-08-17T08:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FORMAT - Missing Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292102#M60575</link>
      <description>&lt;P&gt;Thank you for your help, that worked!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 08:48:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FORMAT-Missing-Values/m-p/292102#M60575</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2016-08-17T08:48:08Z</dc:date>
    </item>
  </channel>
</rss>

