<?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: check for the existance of a data set or group of data sets? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14602#M2373</link>
    <description>Genius!  That method works perfect, thanks so much!</description>
    <pubDate>Wed, 15 Jun 2011 23:03:16 GMT</pubDate>
    <dc:creator>SASguyCO</dc:creator>
    <dc:date>2011-06-15T23:03:16Z</dc:date>
    <item>
      <title>check for the existance of a data set or group of data sets?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14600#M2371</link>
      <description>I'm curious, is there a way to basically evaluate an "if" statement on whether a certain data set or group of data sets exist and if so run one process and if not, then a different process.&lt;BR /&gt;
&lt;BR /&gt;
In other words:&lt;BR /&gt;
&lt;BR /&gt;
%macro exists;&lt;BR /&gt;
%if libname.dset_201104 "exists" %then %do;&lt;BR /&gt;
data;&lt;BR /&gt;
set;&lt;BR /&gt;
code code code;&lt;BR /&gt;
run;&lt;BR /&gt;
%end;&lt;BR /&gt;
&lt;BR /&gt;
%else %do;&lt;BR /&gt;
data;&lt;BR /&gt;
set;&lt;BR /&gt;
code code code;&lt;BR /&gt;
run;&lt;BR /&gt;
%end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%exists</description>
      <pubDate>Wed, 15 Jun 2011 21:40:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14600#M2371</guid>
      <dc:creator>SASguyCO</dc:creator>
      <dc:date>2011-06-15T21:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: check for the existance of a data set or group of data sets?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14601#M2372</link>
      <description>I don't know if you do can do it in one if statement but you can use the open function to check if the dataset exists.&lt;BR /&gt;
&lt;BR /&gt;
see open function, page 2 of the following paper.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi26/p095-26.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi26/p095-26.pdf&lt;/A&gt;</description>
      <pubDate>Wed, 15 Jun 2011 22:46:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14601#M2372</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-06-15T22:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: check for the existance of a data set or group of data sets?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14602#M2373</link>
      <description>Genius!  That method works perfect, thanks so much!</description>
      <pubDate>Wed, 15 Jun 2011 23:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14602#M2373</guid>
      <dc:creator>SASguyCO</dc:creator>
      <dc:date>2011-06-15T23:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: check for the existance of a data set or group of data sets?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14603#M2374</link>
      <description>There's also the EXIST function for checking if a SAS dataset exists or not:&lt;BR /&gt;
&lt;BR /&gt;
if EXIST('library.dataset') then......;</description>
      <pubDate>Thu, 16 Jun 2011 04:02:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14603#M2374</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2011-06-16T04:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: check for the existance of a data set or group of data sets?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14604#M2375</link>
      <description>Thanks Kiwi, I didn't realized the "exist" function existed :).  How convenient!</description>
      <pubDate>Thu, 16 Jun 2011 19:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/check-for-the-existance-of-a-data-set-or-group-of-data-sets/m-p/14604#M2375</guid>
      <dc:creator>SASguyCO</dc:creator>
      <dc:date>2011-06-16T19:22:48Z</dc:date>
    </item>
  </channel>
</rss>

