At 10:06 04-03-98 -0400, you wrote:
> Dear All,
>
> I used to think that once a open statement like :
>
> merror=0 ; k1 = 16
> open(93,file=scr2(1:len_trim(scr2)), access='direct', &
> recl=k1, iostat=merror)
> if(merror /= 0) then
> ! ........
> stop
> endif
>
> was successful, I could write to that file provided that I had write
> permission in the local directory.
>
> Recently, I had a case where the open statement was passed but the
> write failed because
>
> " Fortran unit 93 is not connected ".
>
> Some colleagues believe that it could be implementation dependent.
>
> I would appreciate if someone could shed some light on the topic.
>
Sorry, I can not explain this error!
I tried the program, annexed to this mail with Salford FTN95 v1.14
If the named file does not exist or is empty, running
the program creates an empty file, then ends with message:
File access and properties are incompatible
otherwise (it is a textfile) program cannot open file, output
File not opened 108
program x
character (len=30) :: scr2 = "X123.XXX"
kerror=0
k1 = 16
open(13,file=scr2(1:len_trim(scr2)),access='direct', &
! action='readwrite', &
& recl=k1,iostat=kerror)
if(kerror /= 0) then
print *, "File not opened", kerror
stop
endif
write(13) scr2(1:k1)
end program x
!
---
Meilleures Salutations,
Best Greetings,
/---
Jan van Oosterwijk
Computing Centre
Delft University of Technology
Postbus 354
2600 AJ Delft
Netherlands / Pays Bas
Phone: +31 15 278 50 17
Fax: +31 15 278 37 87
|