<?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: If error &amp;quot;physical file doesnt exist&amp;quot; then... in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343713#M272946</link>
    <description>&lt;P&gt;Why not use the fexist() function first to determine if the file exists, and use that as condition?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2017 14:00:52 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-03-23T14:00:52Z</dc:date>
    <item>
      <title>If error "physical file doesnt exist" then...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343707#M272945</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a macro which checks if the file exist and if it doesnt i want to append a different data set to another set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have an idea to use syserr option&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%if&lt;/FONT&gt; &lt;FONT face="Courier New" size="3"&gt;&amp;amp;syserr &amp;gt; 1&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;proc append base=base.data data=test_data &amp;nbsp;force;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;but I want to specify that if concrete error occurs "physical file doesnt exist" then the proc append will work.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Is there a such possibility ?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 13:49:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343707#M272945</guid>
      <dc:creator>John1231</dc:creator>
      <dc:date>2017-03-23T13:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: If error "physical file doesnt exist" then...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343713#M272946</link>
      <description>&lt;P&gt;Why not use the fexist() function first to determine if the file exists, and use that as condition?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 14:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343713#M272946</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-23T14:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: If error "physical file doesnt exist" then...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343726#M272947</link>
      <description>&lt;P&gt;i had a problem with fexist, but&amp;nbsp; i fixed it&amp;nbsp;so it's ok.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i'm curious, is there a possibility to determine condtional logic based on a specified error ?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 14:36:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343726#M272947</guid>
      <dc:creator>John1231</dc:creator>
      <dc:date>2017-03-23T14:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: If error "physical file doesnt exist" then...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343731#M272948</link>
      <description>&lt;P&gt;If you have a code that identifies a specific error, you can use that. But the &lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/69726/HTML/default/viewer.htm#n1wrevo4roqsnxn1fbd9yezxvv9k.htm" target="_blank"&gt;documentation for &amp;amp;syserr&lt;/A&gt; does not show a particular code for "physical file does not exist". So I recommend to check with fexist, as you otherwise might do something unexpected when another error occurs.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 14:57:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343731#M272948</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-23T14:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: If error "physical file doesnt exist" then...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343913#M272949</link>
      <description>and FILEEXIST()</description>
      <pubDate>Thu, 23 Mar 2017 23:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-error-quot-physical-file-doesnt-exist-quot-then/m-p/343913#M272949</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2017-03-23T23:18:39Z</dc:date>
    </item>
  </channel>
</rss>

