<?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: How to do not consider Label value in a proc compare in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956379#M45730</link>
    <description>&lt;P&gt;You want this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have1 have2;
set sashelp.heart(obs=100);
run;

data have2;
set have2;
if _n_=1 then weight=1;
label Smoking_Status='XXXX';
run;


ods exclude  CompareVariables;
proc compare base=have1 compare=have2;
run;
&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 Jan 2025 01:27:07 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-01-17T01:27:07Z</dc:date>
    <item>
      <title>How to do not consider Label value in a proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956340#M45727</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;How do we remove (do not consider this info)&amp;nbsp; the label information into a proc compare ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc compare
 base = dim_calendrier_v1
 compare = dim_calendrier_draft;
 var 
SK_Temps
Date
.
.
.
other variables
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 20:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956340#M45727</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2025-01-16T20:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to do not consider Label value in a proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956368#M45728</link>
      <description>&lt;P&gt;I don't think you can do that directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have other options though:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Preferred option: Align the labels.&lt;/P&gt;
&lt;P&gt;Unless there is a good reason, the same variable should have the same attributes in all data sets. Improve your DQ!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Ignore the report box labelled&lt;/P&gt;
&lt;PRE class="batch" style="border-spacing: 1px;"&gt; Listing of Common Variables with Differing Attributes &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Compare a view of the data sets where labels have been removed.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data T1;
  Z=1; 
  label Z='a';
run; 
data T2;
  Z=1;
  label Z='aa';
run;
 
data _V1/view=_V1;
  set T1; 
  attrib _ALL_ label=' ';
run;
data _V2/view=_V2;
  set T2;
  attrib _ALL_ label=' ';
run;

proc compare base=T1  compare=T2 ; run;
proc compare base=_V1 compare=_V2; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. Export the results to a data set using the &lt;CODE class=" language-sas"&gt;out=&lt;/CODE&gt; option, rather than looking at a report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 22:32:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956368#M45728</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2025-01-16T22:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to do not consider Label value in a proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956369#M45729</link>
      <description>&lt;P&gt;Have you tried?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nolabel;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have not, but it might do what you want.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 22:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956369#M45729</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2025-01-16T22:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to do not consider Label value in a proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956379#M45730</link>
      <description>&lt;P&gt;You want this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have1 have2;
set sashelp.heart(obs=100);
run;

data have2;
set have2;
if _n_=1 then weight=1;
label Smoking_Status='XXXX';
run;


ods exclude  CompareVariables;
proc compare base=have1 compare=have2;
run;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jan 2025 01:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956379#M45730</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-01-17T01:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to do not consider Label value in a proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956392#M45731</link>
      <description>&lt;P&gt;A third way is to use an ATTRIB statement to remove the labels from all the variables at procedure time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc compare base=have1 compare=have2;
  attrib _all_ label=' '; 
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jan 2025 08:07:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-do-not-consider-Label-value-in-a-proc-compare/m-p/956392#M45731</guid>
      <dc:creator>RichardAD</dc:creator>
      <dc:date>2025-01-17T08:07:06Z</dc:date>
    </item>
  </channel>
</rss>

