<?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: PROC COMPARE: Processing output dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54187#M15003</link>
    <description>15 years of coding SAS and I had never heard of that one.  Thanks.</description>
    <pubDate>Wed, 15 Oct 2008 17:42:09 GMT</pubDate>
    <dc:creator>DavidJ</dc:creator>
    <dc:date>2008-10-15T17:42:09Z</dc:date>
    <item>
      <title>PROC COMPARE: Processing output dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54185#M15001</link>
      <description>In the following example:&lt;BR /&gt;
DATA A;&lt;BR /&gt;
   KEY = 100;&lt;BR /&gt;
   Value1 = 200;  Value2 = 400;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Data B;&lt;BR /&gt;
   KEY = 100;&lt;BR /&gt;
   Value1 = 200; Value2 = 410;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc compare BASE=A  COMPARE=B CRITERION=2 NOSUMMARY METHOD=ABSOLUTE NOPRINT OUTNOEQUAL OUT=MYDIFFS;&lt;BR /&gt;
            ID KEY; &lt;BR /&gt;
 run;&lt;BR /&gt;
&lt;BR /&gt;
The dataset MYDIFFS contains 1 record, as follows (and as expected):&lt;BR /&gt;
_TYPE_ = DIF&lt;BR /&gt;
_OBS_ = 1&lt;BR /&gt;
KEY = 100&lt;BR /&gt;
Value1 = E&lt;BR /&gt;
Value2 = 10&lt;BR /&gt;
&lt;BR /&gt;
However if I try and process the MYDIFFS dataset and attempt to change the E to a 0, SAS will throw an error since Value1/2 are numeric.  Is there a simple solution to this?</description>
      <pubDate>Wed, 15 Oct 2008 15:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54185#M15001</guid>
      <dc:creator>DavidJ</dc:creator>
      <dc:date>2008-10-15T15:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: PROC COMPARE: Processing output dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54186#M15002</link>
      <description>The value is actually special missing value E.  To refere to this in code use .E&lt;BR /&gt;
&lt;BR /&gt;
if value1 eq .E then ...</description>
      <pubDate>Wed, 15 Oct 2008 16:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54186#M15002</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2008-10-15T16:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC COMPARE: Processing output dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54187#M15003</link>
      <description>15 years of coding SAS and I had never heard of that one.  Thanks.</description>
      <pubDate>Wed, 15 Oct 2008 17:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54187#M15003</guid>
      <dc:creator>DavidJ</dc:creator>
      <dc:date>2008-10-15T17:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: PROC COMPARE: Processing output dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54188#M15004</link>
      <description>"Special missing values" have been around since at least version 5.&lt;BR /&gt;
&lt;BR /&gt;
They are extensively used in certain pockets of analysis (like surveys where you want to code the reason that a value is missing), but many people go through their entire SAS careers without needing them.&lt;BR /&gt;
&lt;BR /&gt;
I've rarely needed them, but when I did they were a very valuable tool.&lt;BR /&gt;
&lt;BR /&gt;
Doc</description>
      <pubDate>Wed, 15 Oct 2008 20:26:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54188#M15004</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2008-10-15T20:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC COMPARE: Processing output dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54189#M15005</link>
      <description>You might like the "generic" missing function. You don't need to know the type.&lt;BR /&gt;
&lt;BR /&gt;
if missing(value1) then...&lt;BR /&gt;
&lt;BR /&gt;
Also coalesce if nice for a missing to non-missing value conversion.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
44   data _null_;&lt;BR /&gt;
45      do y = 1,.e,3;&lt;BR /&gt;
46         z = coalesce(y,0);&lt;BR /&gt;
47         put (_all_)(=);&lt;BR /&gt;
48         end;&lt;BR /&gt;
49      run;&lt;BR /&gt;
&lt;BR /&gt;
y=1 z=1&lt;BR /&gt;
y=E z=0&lt;BR /&gt;
y=3 z=3&lt;BR /&gt;
[pre]</description>
      <pubDate>Thu, 16 Oct 2008 00:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-COMPARE-Processing-output-dataset/m-p/54189#M15005</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2008-10-16T00:33:54Z</dc:date>
    </item>
  </channel>
</rss>

