<?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 find the variables that are present in one data set but in others in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-variables-that-are-present-in-one-data-set-but/m-p/283262#M57727</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally I would be worried about the "200 columns", that is never a good way to work and will cause you problems throughout programming with it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
  create table VARS_MISSING as
  select  VNAME
  from    (select * from SASHELP.VCOLUMN where LIBNAME="&amp;lt;your library&amp;gt;" and MEMNAME="&amp;lt;your dataset in upcase&amp;gt;")
  except  (select * from SASHELP.VCOLUMN where LIBNAME="&amp;lt;your library&amp;gt;" and MEMNAME="&amp;lt;your other dataset in upcase&amp;gt;");
quit;
  &lt;/PRE&gt;</description>
    <pubDate>Mon, 11 Jul 2016 09:02:12 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-07-11T09:02:12Z</dc:date>
    <item>
      <title>How to find the variables that are present in one data set but in others</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-variables-that-are-present-in-one-data-set-but/m-p/283231#M57704</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with more than 200 variables. How to find the variables that present in my dataset but in vendor dataset. I checked using proc contents procedure. It is taking time. Is there a quick way to identify. Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jul 2016 22:57:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-variables-that-are-present-in-one-data-set-but/m-p/283231#M57704</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-07-10T22:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the variables that are present in one data set but in others</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-variables-that-are-present-in-one-data-set-but/m-p/283232#M57705</link>
      <description>&lt;P&gt;1. Proc Compare - will print a report.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Use SASHELP.VCOLUMN/Dictionary.Column. These are datasets that contain the variables in each dataset. It's worth learning how to use these well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give them a shot and if you need more help post the code you've tried.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jul 2016 23:34:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-variables-that-are-present-in-one-data-set-but/m-p/283232#M57705</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-10T23:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the variables that are present in one data set but in others</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-variables-that-are-present-in-one-data-set-but/m-p/283235#M57708</link>
      <description>&lt;P&gt;Don't run a PROC COMPARE on the data sets themselves. &amp;nbsp;Run it on the output of PROC CONTENTS. &amp;nbsp;For example:'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc contents data=a noprint out=a_contents;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;proc contents data=b noprint out=b_contents;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then run the PROC COMPARE to compare a_contents vs. b_contents. &amp;nbsp;Use NAME as the BY or ID variable.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 00:06:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-variables-that-are-present-in-one-data-set-but/m-p/283235#M57708</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-07-11T00:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the variables that are present in one data set but in others</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-variables-that-are-present-in-one-data-set-but/m-p/283262#M57727</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally I would be worried about the "200 columns", that is never a good way to work and will cause you problems throughout programming with it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
  create table VARS_MISSING as
  select  VNAME
  from    (select * from SASHELP.VCOLUMN where LIBNAME="&amp;lt;your library&amp;gt;" and MEMNAME="&amp;lt;your dataset in upcase&amp;gt;")
  except  (select * from SASHELP.VCOLUMN where LIBNAME="&amp;lt;your library&amp;gt;" and MEMNAME="&amp;lt;your other dataset in upcase&amp;gt;");
quit;
  &lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Jul 2016 09:02:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-variables-that-are-present-in-one-data-set-but/m-p/283262#M57727</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-07-11T09:02:12Z</dc:date>
    </item>
  </channel>
</rss>

