<?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 OUTPUT IN PDF FORMAT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/OUTPUT-IN-PDF-FORMAT/m-p/352630#M82222</link>
    <description>&lt;P&gt;Hii ,I have two datasets,I need to compare those two datasets and get the variables list that are common, not common &amp;nbsp;and get that in a pdf format,&lt;/P&gt;&lt;P&gt;for example I have a dataset1 with the follwing varaibles:&lt;/P&gt;&lt;P&gt;id name manager&lt;/P&gt;&lt;P&gt;dataset2 with the following variables:&lt;/P&gt;&lt;P&gt;id manager managerid&lt;/P&gt;&lt;P&gt;I need the output as&lt;/P&gt;&lt;P&gt;&amp;nbsp;commonvaraibles &amp;nbsp; &amp;nbsp; &amp;nbsp;notcommonvariables&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;managerid&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;manager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name&lt;/P&gt;&lt;P&gt;I dont have much knowledge on ODS,Pls helpme regarding this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Apr 2017 19:10:34 GMT</pubDate>
    <dc:creator>molla</dc:creator>
    <dc:date>2017-04-23T19:10:34Z</dc:date>
    <item>
      <title>OUTPUT IN PDF FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/OUTPUT-IN-PDF-FORMAT/m-p/352630#M82222</link>
      <description>&lt;P&gt;Hii ,I have two datasets,I need to compare those two datasets and get the variables list that are common, not common &amp;nbsp;and get that in a pdf format,&lt;/P&gt;&lt;P&gt;for example I have a dataset1 with the follwing varaibles:&lt;/P&gt;&lt;P&gt;id name manager&lt;/P&gt;&lt;P&gt;dataset2 with the following variables:&lt;/P&gt;&lt;P&gt;id manager managerid&lt;/P&gt;&lt;P&gt;I need the output as&lt;/P&gt;&lt;P&gt;&amp;nbsp;commonvaraibles &amp;nbsp; &amp;nbsp; &amp;nbsp;notcommonvariables&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;managerid&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;manager &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name&lt;/P&gt;&lt;P&gt;I dont have much knowledge on ODS,Pls helpme regarding this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 19:10:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/OUTPUT-IN-PDF-FORMAT/m-p/352630#M82222</guid>
      <dc:creator>molla</dc:creator>
      <dc:date>2017-04-23T19:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: OUTPUT IN PDF FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/OUTPUT-IN-PDF-FORMAT/m-p/352635#M82225</link>
      <description>&lt;P&gt;I got the common variables :&lt;/P&gt;&lt;P&gt;proc contents data=dataset1 noprint out=out1(keep=name);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc contents data=dataset2 noprint out=out1(keep=name);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data commonvars;&lt;/P&gt;&lt;P&gt;merge out1(in=a) out2(in=b);&lt;/P&gt;&lt;P&gt;by name;&lt;/P&gt;&lt;P&gt;if a and b then output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 19:51:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/OUTPUT-IN-PDF-FORMAT/m-p/352635#M82225</guid>
      <dc:creator>molla</dc:creator>
      <dc:date>2017-04-23T19:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: OUTPUT IN PDF FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/OUTPUT-IN-PDF-FORMAT/m-p/352649#M82227</link>
      <description>&lt;P&gt;I think that the following comes awfully close to what you want:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data dataset1;
   input id $ name manager  $;
   cards;
1 john joe
2 mary judy
;
   
data dataset2;
  input id manager $ managerid;
  cards;
1 tom 1
2 mary 6
;

proc contents data=dataset1 noprint out=out1(keep=name);
run;
proc contents data=dataset2 noprint out=out2(keep=name);
run;

data commonvars (drop=name);
  merge out1(in=a) out2(in=b);
  by name;
  if a and b then commonvariables=name;
  else notcommonvariables=name;
run;

ods pdf file='/folders/myfolders/test.pdf';
proc print data=commonvars;
run;
ods pdf close;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 20:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/OUTPUT-IN-PDF-FORMAT/m-p/352649#M82227</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-04-23T20:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: OUTPUT IN PDF FORMAT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/OUTPUT-IN-PDF-FORMAT/m-p/352653#M82228</link>
      <description>&lt;P&gt;You should look into PROC COMPARE for this solution rather than hard code it. This is how your code should look, but you probably want to add some options to PROC COMPARE to limit the output to what you're interested in.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file='myfile.pdf';

proc compare data=one compare=two;
run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here's an example of how I deal with this, when having multiple data sets and need to identify which variables are present in which datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/3b57ae085d9f7a36a2d95c15f04e72e6" target="_blank"&gt;https://gist.github.com/statgeek/3b57ae085d9f7a36a2d95c15f04e72e6&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Apr 2017 20:48:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/OUTPUT-IN-PDF-FORMAT/m-p/352653#M82228</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-23T20:48:23Z</dc:date>
    </item>
  </channel>
</rss>

