<?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 check dataset from lib in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/check-dataset-from-lib/m-p/180355#M45967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question,in a library i have few datasets like abc12,abc13,abc14,abc15. need to find dynamically whether that dataset is available in that library or not, if it is available then need to create a macro..&lt;/P&gt;&lt;P&gt;suppose i am checking in that library with respective number 15, then&amp;nbsp; need to create a macro macro=abc15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Aug 2014 21:48:05 GMT</pubDate>
    <dc:creator>sam369</dc:creator>
    <dc:date>2014-08-29T21:48:05Z</dc:date>
    <item>
      <title>check dataset from lib</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/check-dataset-from-lib/m-p/180355#M45967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question,in a library i have few datasets like abc12,abc13,abc14,abc15. need to find dynamically whether that dataset is available in that library or not, if it is available then need to create a macro..&lt;/P&gt;&lt;P&gt;suppose i am checking in that library with respective number 15, then&amp;nbsp; need to create a macro macro=abc15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 21:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/check-dataset-from-lib/m-p/180355#M45967</guid>
      <dc:creator>sam369</dc:creator>
      <dc:date>2014-08-29T21:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: check dataset from lib</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/check-dataset-from-lib/m-p/180356#M45968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A name="p15ozfcy7kicotn1y0ehtiw3fkz3"&gt;&lt;/A&gt;This example &lt;/P&gt;&lt;P&gt;verifies the existence of a data set. If the data set does not exist, then the &lt;/P&gt;&lt;P&gt;example displays a message in the log:&lt;/P&gt;&lt;PRE class="codeFragment"&gt;
&lt;P&gt;%let dsname=sasuser.houses;&lt;/P&gt;
&lt;P&gt;%macro opends(name);&lt;/P&gt;
&lt;P&gt;%if %sysfunc(exist(&amp;amp;name)) %then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; %let dsid=%sysfunc(open(&amp;amp;name,i));&lt;/P&gt;
&lt;P&gt;%else %put Data set &amp;amp;name does not exist.;&lt;/P&gt;
&lt;P&gt;%mend opends;&lt;/P&gt;
&lt;P&gt;%opends(&amp;amp;dsname);&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 22:39:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/check-dataset-from-lib/m-p/180356#M45968</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-08-29T22:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: check dataset from lib</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/check-dataset-from-lib/m-p/180357#M45969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you ballardw, exactly that is what i am lookign for&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Aug 2014 13:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/check-dataset-from-lib/m-p/180357#M45969</guid>
      <dc:creator>sam369</dc:creator>
      <dc:date>2014-08-31T13:58:16Z</dc:date>
    </item>
  </channel>
</rss>

