<?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 merge to compare labels in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/merge-to-compare-labels/m-p/509693#M137052</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to merge datasets to see if there are missmatch in labels,There are multiple studies and would like to see labels for variable like in dataset C.First I tried to join 2 datasets and its overwritting label .Any suggestion please?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="merge.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24585i0CA2149D0B1E96D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="merge.png" alt="merge.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Nov 2018 21:08:29 GMT</pubDate>
    <dc:creator>paddyb</dc:creator>
    <dc:date>2018-11-01T21:08:29Z</dc:date>
    <item>
      <title>merge to compare labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-to-compare-labels/m-p/509693#M137052</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to merge datasets to see if there are missmatch in labels,There are multiple studies and would like to see labels for variable like in dataset C.First I tried to join 2 datasets and its overwritting label .Any suggestion please?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="merge.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24585i0CA2149D0B1E96D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="merge.png" alt="merge.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 21:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-to-compare-labels/m-p/509693#M137052</guid>
      <dc:creator>paddyb</dc:creator>
      <dc:date>2018-11-01T21:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: merge to compare labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-to-compare-labels/m-p/509700#M137059</link>
      <description>Give them different variable names. You can rename it in the MERGE statement if that's what you're using.</description>
      <pubDate>Thu, 01 Nov 2018 21:22:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-to-compare-labels/m-p/509700#M137059</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-01T21:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: merge to compare labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-to-compare-labels/m-p/509701#M137060</link>
      <description>&lt;P&gt;use a rename statement for the labels column in table b so that when you merge the data you have a column for the labels from a and b&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;something like this&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data have;&lt;BR /&gt;&amp;nbsp;set have(rename=(label=have_label));&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 21:31:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-to-compare-labels/m-p/509701#M137060</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-11-01T21:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: merge to compare labels</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-to-compare-labels/m-p/509710#M137066</link>
      <description>&lt;P&gt;Something like this may help. DICTIONARY.COLUMNS is a special data source that SAS stores all the information describing all of the variables in all data sets in currently assigned libraries.&lt;/P&gt;
&lt;P&gt;This assumes that all of your sets are in the same library which I indicated by 'YOURLIB' the name needs to be in uppercase and in quotes. Memname also should be in uppercase. If you have a large number of similar names you may be able to use the LIKE predicate with wildcards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I couldn't tell what library you are using, I suspect that you actually want memname to be the name of other data sets like ADAE instead of the "sets" that you show in the picture.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The proc tabulate output will have the name of the variable as the left-most row label grouping all the values of label. The columns will be the data set name and a 1 will appear under dataset name that matches the variable name and label combination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
   create table labels as
   select memname, name, label
   from dictionary.columns
   where libname='YOURLIB' and
      memname in ('DATASETA' 'DATASETB' 'DATASETC' 'DATASETD')
   ;
quit;

proc tabulate data=labels;
  class memname name label;
  table name=''*label='',
        memname
        /misstext=' '
   ;
run;
&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Nov 2018 21:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-to-compare-labels/m-p/509710#M137066</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-01T21:53:57Z</dc:date>
    </item>
  </channel>
</rss>

