Allow Fortran user program to read XP system file 
Author Message
 Allow Fortran user program to read XP system file

Below CVF6.6 program balks executing OPEN statement with the Windows XP
error:
   "Process cannot access the file because it is being used by another
process"

program read_system_file
open (1,file='Z:\Temporary Internet
Files\Content.IE5\index.dat',action='read')
end program

My old dos TREE86, and newer ZWIN utility file manipulation programs can
read this file,
AND the  old dos ZIPZAP bit diddle program can even modify bytes in it, (I
tried it)...
Sooo, why cant I at least read it with my program?



Wed, 05 May 2004 19:49:20 GMT  
 Allow Fortran user program to read XP system file

Quote:

> Below CVF6.6 program balks executing OPEN statement with the Windows XP
> error:
>    "Process cannot access the file because it is being used by another
> process"

> program read_system_file
> open (1,file='Z:\Temporary Internet
> Files\Content.IE5\index.dat',action='read')
> end program

> My old dos TREE86, and newer ZWIN utility file manipulation programs can
> read this file,
> AND the  old dos ZIPZAP bit diddle program can even modify bytes in it, (I
> tried it)...
> Sooo, why cant I at least read it with my program?

Now had you used Linux ... ;-)

The DOS programs never knew that they were not supposed to interfere
with other files. So TREE86 and ZIPZAP just go ahead and do their
stuff.

If ZWIN is DOS or 16-bit Windows then it still has the same feature.
From Win9X on then better file protection should be expected. How is
'read' handled at the Windows end? At the fortran end it may indicate
that the file is not to be tampered with, but this may simply be
(under Windows) by setting the READ ONLY attribute. So Windows may
kick in with an error message - the intent is not clear.

This seems like a question that may be best posted directly to CVF
support.



Thu, 06 May 2004 02:48:11 GMT  
 Allow Fortran user program to read XP system file


Quote:
> Now had you used Linux ... ;-)

You cant be serious, ha ha.

Quote:
> The DOS programs never knew that they were not supposed to interfere
> with other files. So TREE86 and ZIPZAP just go ahead and do their
> stuff.

> If ZWIN is DOS or 16-bit Windows then it still has the same feature.
> From Win9X on then better file protection should be expected. How is
> 'read' handled at the Windows end? At the Fortran end it may indicate
> that the file is not to be tampered with, but this may simply be
> (under Windows) by setting the READ ONLY attribute. So Windows may
> kick in with an error message - the intent is not clear.

> This seems like a question that may be best posted directly to CVF
> support.

I really meant to say  ZTREE (afaik, there is no such animal a ZWIN)..
ZTREE is a nice file utility and is a Win32 app.   Try it free:
www.ztree.com

btw, I created a DOS app. using MS Fortran5.1 and altho it would not accept
the long filename, it would accept
and read   index.dat file if my app. just tried to open (1,file='index.dat')
even without specifying "read-only"  which confirms that XP is granting DOS
apps more privileges than it does user created 32-bit apps.



Thu, 06 May 2004 23:13:24 GMT  
 Allow Fortran user program to read XP system file
On Sun, 18 Nov 2001 15:13:24 GMT, "David Frank"

[snip]

Quote:
>even without specifying "read-only"  which confirms that XP is granting DOS
>apps more privileges than it does user created 32-bit apps.

Clearly a sign of respect, acknowledging that those of us still
writing DOS apps can be trusted.

Ken Plotkin



Fri, 07 May 2004 01:39:22 GMT  
 Allow Fortran user program to read XP system file


Quote:
> Below CVF6.6 program balks executing OPEN statement with the Windows XP
> error:
>    "Process cannot access the file because it is being used by another
> process"

> program read_system_file
> open (1,file='Z:\Temporary Internet
> Files\Content.IE5\index.dat',action='read')
> end program

Doing a little rtfm'ing with the cvf documentation, I came across 2 items
that seems to me are equivalent.
1.  cvf fortran i/o OPEN defaults to shared files
2.   to achieve compatibility with MS Powerstation there is a compile switch
/fpscomp:general that allows
     same file sharing as FPS4.0 to be the default (that is files are opened
shared)..

It seems to me that #1 is NOT true,  ELSE why does #2 solve my problem?
Any-who,  when I compile my little test program with the open statement
above I can then read the file.

Quote:
>DF /fpscomp:general TEST.F90



Sat, 08 May 2004 01:27:06 GMT  
 Allow Fortran user program to read XP system file
On Mon, 19 Nov 2001 17:27:06 GMT, "David Frank"

Quote:

>Doing a little rtfm'ing with the cvf documentation, I came across 2 items
>that seems to me are equivalent.
>1.  cvf fortran i/o OPEN defaults to shared files
>2.   to achieve compatibility with MS Powerstation there is a compile switch
>/fpscomp:general that allows
>     same file sharing as FPS4.0 to be the default (that is files are opened
>shared)..

>It seems to me that #1 is NOT true,  ELSE why does #2 solve my problem?
>Any-who,  when I compile my little test program with the open statement
>above I can then read the file.

You need to Read The Fine Manual more carefully.  To quote: "On Tru64
UNIX and Linux systems, shared access is the default for the Fortran
I/O system.  On Windows NT and Windows 9* systems [this really should
say just "Windows"], it is the default if SHARED [is also specified]
or compiler option /fpscomp:general is specified."

In other words, shared access is NOT the default on Windows.


Steve Lionel
Compaq Fortran Engineering
Intel Corporation
Nashua, NH

Compaq Fortran - http://www.compaq.com/fortran
Intel Fortran - http://developer.intel.com/software/products/compilers/f50/



Sat, 08 May 2004 02:22:58 GMT  
 Allow Fortran user program to read XP system file


Quote:
> You need to Read The Fine Manual more carefully.  To quote: "On Tru64
> UNIX and Linux systems, shared access is the default for the Fortran
> I/O system.  On Windows NT and Windows 9* systems [this really should
> say just "Windows"], it is the default if SHARED [is also specified]
> or compiler option /fpscomp:general is specified."

> In other words, shared access is NOT the default on Windows.

Well I guess it depends on which manual you read too finely..:
The language ref. manual sez at 13.6.26
:   "shared access is the default for the Fortran I/O system"

the bottom the page where is says this is identified as:
   File Operations I/O on DIGITAL UNIX, Windows NT, and Window 95 Systems
13-41



Sat, 08 May 2004 04:36:10 GMT  
 Allow Fortran user program to read XP system file
On Mon, 19 Nov 2001 20:36:10 GMT, "David Frank"

Quote:

>Well I guess it depends on which manual you read too finely..:
>The language ref. manual sez at 13.6.26
>:   "shared access is the default for the Fortran I/O system"

>the bottom the page where is says this is identified as:
>   File Operations I/O on DIGITAL UNIX, Windows NT, and Window 95 Systems
>13-41

Oh, you've got the DVF 5.0 manual.  The manual was revised in 1999 to
have the text I quoted.


Steve Lionel
Compaq Fortran Engineering
Intel Corporation
Nashua, NH

Compaq Fortran - http://www.compaq.com/fortran
Intel Fortran - http://developer.intel.com/software/products/compilers/f50/



Sat, 08 May 2004 05:07:07 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Allowing user code within a program

2. fortran program to read a unformatted sequential file

3. need help reading fortran unformatted file from a c program

4. fortran program reading an external text (and numbers) file and writing with edits

5. Program mysteriously closing down - XP system

6. How to read default setting of e-mail program on XP or Win2000

7. How to read the Windows XP Modemlog file?

8. C for FORTRAN user and C++ for FORTRAN users

9. Reading fortran text files / Parsing ascii files/ Help!!

10. Open specific file, read entire contents, close - no user interaction

11. How to read user file

12. Add to Tk distributions reference files which may not be on user's system

 

 
Powered by phpBB® Forum Software