<?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: Open statement failure in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Open-statement-failure/m-p/956295#M20895</link>
    <description>It is not necessarily helpful on this particular one, but because there are a lot of problems with opening files, here is a useful little utility for checking on the existence of a file.  I inherited it many years ago and it is by now a well-used member of my user utilities library.  Its name is easier for bears to remember than the single line of code that it contains, is an alternative to putting STATUS = ?OLD? in the OPEN statement and is in a form that keeps the code flowing, eg: &lt;BR /&gt; &lt;BR /&gt;IF (FIND_FILE(INPUT_DATA_FILE)) THEN &lt;BR /&gt;  OPEN(UNIT=1, FILE=INPUT_DATA_FILE, ACTION=?READ?) &lt;BR /&gt;ELSE &lt;BR /&gt;  WRITE(*,*) ?INPUT DATA FILE NOT FOUND? &lt;BR /&gt;  PAUSE &lt;BR /&gt;  STOP &lt;BR /&gt;END IF &lt;BR /&gt; &lt;BR /&gt;&lt;PRE&gt; 
      LOGICAL*1 FUNCTION FIND_FILE(FILE1) 
C 
C     THIS FUNCTION RETURNS TRUE IF "FILE1" EXISTS, OTHERWISE FALSE. 
C     ARG:  CHARACTER*(*)  FILE1 - NAME OF FILE 
C 
      IMPLICIT NONE 
      CHARACTER* (*) FILE1 
C 
      INQUIRE (FILE=FILE1, EXIST=FIND_FILE) 
    END 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;Bear of little brain</description>
    <pubDate>Wed, 27 Jun 2001 14:48:53 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2001-06-27T14:48:53Z</dc:date>
    <item>
      <title>Open statement failure</title>
      <link>https://community.intel.com/t5/Software-Archive/Open-statement-failure/m-p/956293#M20893</link>
      <description>The following open statement is not working in Visual Fort ran 6.0 &lt;BR /&gt;and Windows 2000.  &lt;BR /&gt; &lt;BR /&gt;open (unit=35,file=cc:cashflow.cfi', &lt;BR /&gt;     *	status=old',action=read',iostat=is) &lt;BR /&gt; &lt;BR /&gt;I physically check the file. It does exist and I have full access of it. The same statement in Fort ran 4.0 and Win 95 &lt;BR /&gt;works OK (even though it sounds working in some machines but not others).  &lt;BR /&gt;Anybody has idea what is the problem and how to fix &lt;BR /&gt;it. &lt;BR /&gt; &lt;BR /&gt;Thanks. &lt;BR /&gt; &lt;BR /&gt;Roger Lei</description>
      <pubDate>Wed, 27 Jun 2001 06:45:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Open-statement-failure/m-p/956293#M20893</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-06-27T06:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Open statement failure</title>
      <link>https://community.intel.com/t5/Software-Archive/Open-statement-failure/m-p/956294#M20894</link>
      <description>What is the value of the IOSTAT variable after the OPEN fails?  What error is displayed if you leave off IOSTAT=?&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 27 Jun 2001 08:49:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Open-statement-failure/m-p/956294#M20894</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2001-06-27T08:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Open statement failure</title>
      <link>https://community.intel.com/t5/Software-Archive/Open-statement-failure/m-p/956295#M20895</link>
      <description>It is not necessarily helpful on this particular one, but because there are a lot of problems with opening files, here is a useful little utility for checking on the existence of a file.  I inherited it many years ago and it is by now a well-used member of my user utilities library.  Its name is easier for bears to remember than the single line of code that it contains, is an alternative to putting STATUS = ?OLD? in the OPEN statement and is in a form that keeps the code flowing, eg: &lt;BR /&gt; &lt;BR /&gt;IF (FIND_FILE(INPUT_DATA_FILE)) THEN &lt;BR /&gt;  OPEN(UNIT=1, FILE=INPUT_DATA_FILE, ACTION=?READ?) &lt;BR /&gt;ELSE &lt;BR /&gt;  WRITE(*,*) ?INPUT DATA FILE NOT FOUND? &lt;BR /&gt;  PAUSE &lt;BR /&gt;  STOP &lt;BR /&gt;END IF &lt;BR /&gt; &lt;BR /&gt;&lt;PRE&gt; 
      LOGICAL*1 FUNCTION FIND_FILE(FILE1) 
C 
C     THIS FUNCTION RETURNS TRUE IF "FILE1" EXISTS, OTHERWISE FALSE. 
C     ARG:  CHARACTER*(*)  FILE1 - NAME OF FILE 
C 
      IMPLICIT NONE 
      CHARACTER* (*) FILE1 
C 
      INQUIRE (FILE=FILE1, EXIST=FIND_FILE) 
    END 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;Bear of little brain</description>
      <pubDate>Wed, 27 Jun 2001 14:48:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Open-statement-failure/m-p/956295#M20895</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-06-27T14:48:53Z</dc:date>
    </item>
  </channel>
</rss>

