Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28485 Discussions

is it possible for two users to write a common Direct Access file?

Xj_Kong
Novice
274 Views

It means the two(or more) users write different records to the same file by different programs.

How to write to the shared file by Fortran implementation?

0 Kudos
2 Replies
Arjen_Markus
Honored Contributor I
274 Views

My answer is not going to be helpful: the problem is not something that is covered by the Fortran language, as far as I understand, but more a problem of the operating system and possibly the file system as well.

I think it is more useful now to think about the actual problem you are trying to solve and from this question arose. Are you trying to share information between programs? Or filling a database? Or ...?

0 Kudos
Steven_L_Intel1
Employee
274 Views

You CAN do this using extensions, but the different programs may not see the same data. You can try it by adding the SHARED keyword to the OPEN statement for the file.

There are other ways to share data between programs that are more reliable, such as shared data in a DLL. (See DLL_Shared_Data sample provided with the product in DLL.zip)

0 Kudos
Reply