FIX: F6415 on OPEN Statement w/ MS-DOS APPEND Command

Last reviewed: September 16, 1997
Article ID: Q79713
4.10 5.00 5.10 MS-DOS kbprg kbbuglist kberrmsg

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS, versions 4.1, 5.0, and 5.1

SYMPTOMS

Programs compiled with Microsoft FORTRAN version 4.1, 5.0, or 5.1, that attempt to open a file that exists in any of the directories specified with the MS-DOS APPEND command, may generate the following error:

   run-time Error F6415: OPEN(filename)
   -  File Already Exists

This error may still be generated even if the full path to the filename is given. Microsoft FORTRAN versions earlier than 4.1 do not recognize directories specified using the APPEND command, and do not generate this error message.

RESOLUTION

Disabling the MS-DOS APPEND command removes this error message. Opening the file with STATUS='OLD' also prevents this error message.

STATUS

Microsoft has confirmed this to be a problem in Microsoft FORTRAN versions 4.1, 5.0, and 5.1 for MS-DOS. This problem was corrected in the Microsoft FORTRAN PowerSttion products.

MORE INFORMATION

The following code generates the F6415 error message if the file TEST.DAT exists in a directory specified by the DOS APPEND path.

Sample Code #1

      OPEN (1, FILE='Test.DAT')
      END

A possible solution to this problem is shown below:

Sample Code #2

      OPEN (1, FILE='Test.DAT', STATUS='OLD')
      END


Additional reference words: 4.10 5.00 5.10
KBCategory: kbprg kbbuglist kberrmsg
KBSubcategory: FORTLngIss
Keywords : FORTLngIss kbbuglist kberrmsg kbprg
Version : 4.10 5.00 5.10
Platform : MS-DOS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.