<?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: SAS Table Update, dependent of test result in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232499#M42378</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Ballardw, I appreciate your&amp;nbsp;detailed solution! &amp;nbsp;I will try implement it and let you know how it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Zhuo&lt;/P&gt;</description>
    <pubDate>Fri, 30 Oct 2015 19:05:30 GMT</pubDate>
    <dc:creator>zz</dc:creator>
    <dc:date>2015-10-30T19:05:30Z</dc:date>
    <item>
      <title>SAS Table Update, dependent of test result</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232487#M42372</link>
      <description>&lt;P&gt;I have a SAS table with columns of dataset name and field names. &amp;nbsp;I need to take the dataset name, and field name in each row and test if the dataset exists under a directory; if exists, I need to test if the field exists in the dataset. &amp;nbsp;Then I need to update the table with two additional columns DatasetExit and FieldExist with 'Yes' and 'No'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions would be highly apprecaited!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2015 17:32:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232487#M42372</guid>
      <dc:creator>zz</dc:creator>
      <dc:date>2015-10-30T17:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Table Update, dependent of test result</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232488#M42373</link>
      <description>You could use proc contents, proc datasets or the views vs table and column in sashelp to get the actual table attributes. There is also a bunch of Sas file functions at hand if you prefer. &lt;BR /&gt;The just apply the result of the comparison to your original table using SQL update or data step modify.</description>
      <pubDate>Fri, 30 Oct 2015 17:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232488#M42373</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-10-30T17:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Table Update, dependent of test result</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232494#M42376</link>
      <description>&lt;P&gt;Something like this perhaps?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; data have;
   informat memname name $32.;
   input memname name;
   label memname='Data set name'
         name   ='Variable name'
   ;
datalines;
class sex
class name
class town
iris species
iris petalwidth
iris weight
frivolous name
;
run;


proc sql;
   create table want as
   select a.*, exist(cats("SASHELP.",a.memname),'DATA') as DataSetExists, 
              (not missing(b.name) ) as FieldExist
   from have as a left join ( select * from dictionary.columns where libname='SASHELP') as b on
      upcase(a.memname)=upcase(b.memname) and upcase (a.name)=upcase(b.name);
quit;
       
     &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This has 1 for yes and 0 for no. You can assign a format or add logic. I recommend a format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2015 18:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232494#M42376</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-10-30T18:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Table Update, dependent of test result</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232499#M42378</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Ballardw, I appreciate your&amp;nbsp;detailed solution! &amp;nbsp;I will try implement it and let you know how it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Zhuo&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2015 19:05:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232499#M42378</guid>
      <dc:creator>zz</dc:creator>
      <dc:date>2015-10-30T19:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Table Update, dependent of test result</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232737#M42425</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;Ballardw, &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have a chance and implemented the solution. &amp;nbsp;It worked perfectly! &amp;nbsp;You are awesome!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Zhuo&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2015 14:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Table-Update-dependent-of-test-result/m-p/232737#M42425</guid>
      <dc:creator>zz</dc:creator>
      <dc:date>2015-11-02T14:16:43Z</dc:date>
    </item>
  </channel>
</rss>

