Home > Archive > Fortran > March 2004 > iostat=10?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Håkan Lane 2004-03-31, 5:39 am |
| I'm having problems opening a file for writing. When examining the value
of the iostat variabel, it has the value 10. Unfortunately, I can't seem
to find a user manual.
Do you know what this value indicates?
Perhaps there is a table somewhere on the web. Thanks in advance!!
Thanks also for all your previous help.
Regards,
Håkan Lane
(Remove NO,SPAM and PLEASE for email)
| |
| David Ham 2004-03-31, 6:36 am |
| On Wed, 31 Mar 2004 12:03:27 +0200
H=E5kan Lane <Hakan.NOLane@Sem.SPAMChalmers.PLEASEse> wrote:
> I'm having problems opening a file for writing. When examining the
> value of the iostat variabel, it has the value 10. Unfortunately, I
> can't seem to find a user manual.
>=20
> Do you know what this value indicates?
Under the standard, it just means "something went wrong". The standard
specifies the sign of iostat (for the open statement 0 is success and a
positive value is failure). It's up to individual compilers which value
corresponds to what sort of problem. If you post your compiler, version
and platform then someone here might be able to tell you what 10 means.
David
| |
| Arjen Markus 2004-03-31, 6:36 am |
| "Håkan Lane" wrote:
>
> I'm having problems opening a file for writing. When examining the value
> of the iostat variabel, it has the value 10. Unfortunately, I can't seem
> to find a user manual.
>
> Do you know what this value indicates?
>
> Perhaps there is a table somewhere on the web. Thanks in advance!!
> Thanks also for all your previous help.
>
These error values are compiler-dependent. All you can be sure of is:
- iostat = 0: no error detected
- iostat < 0: end-of-file condition (or similar but not identical:
end-of-record)
- iostat > 0: some kind of error
Regards,
Arjen
| |
| Michael Metcalf 2004-03-31, 6:36 am |
|
"Håkan Lane" <Hakan.NOLane@Sem.SPAMChalmers.PLEASEse> wrote in message
news:406A976F.18DE@Sem.SPAMChalmers.PLEASEse...
> I'm having problems opening a file for writing. When examining the value
> of the iostat variabel, it has the value 10. Unfortunately, I can't seem
> to find a user manual.
>
> Do you know what this value indicates?
>
> Perhaps there is a table somewhere on the web. Thanks in advance!!
> Thanks also for all your previous help.
>
The value is positive if the OPEN fails. The exact value for a given failure
is system dependent, you thus need to tell is which compiler you are using,
and also show us the exact statement that is failing. Of course, if you're
failing to open an existing file for writing, maybe it's write protected.
Regards,
Mike Metcalf
| |
| David Ham 2004-03-31, 6:36 am |
| On Wed, 31 Mar 2004 12:58:43 +0200
Arjen Markus <arjen.markus@wldelft.nl> wrote:
> "H=E5kan Lane" wrote:
>=20
> These error values are compiler-dependent. All you can be sure of is:
> - iostat =3D 0: no error detected
> - iostat < 0: end-of-file condition (or similar but not identical:
> end-of-record)
Except that you can't hit an end of file|record condition in an open
statement. This one only applies to reads and writes.=20
> - iostat > 0: some kind of error
>=20
> Regards,
>=20
> Arjen
David
| |
| Håkan Lane 2004-03-31, 6:36 am |
| Sorry. I should have thought about doing that. I'm using Compaq Visual
Fortran 6.6B on Win2000.
>
> Under the standard, it just means "something went wrong". The standard
> specifies the sign of iostat (for the open statement 0 is success and a
> positive value is failure). It's up to individual compilers which value
> corresponds to what sort of problem. If you post your compiler, version
> and platform then someone here might be able to tell you what 10 means.
>
> David
| |
| Arjen Markus 2004-03-31, 7:47 am |
| David Ham wrote:[color=darkred]
>
> On Wed, 31 Mar 2004 12:58:43 +0200
> Arjen Markus <arjen.markus@wldelft.nl> wrote:
>
>
> Except that you can't hit an end of file|record condition in an open
> statement. This one only applies to reads and writes.
>
Yes, you are right. I added that given the not-so-old discussion about
the different negative values for IOSTAT and had not noticed that
the question was about failure during _opening_ a file.
Regards,
Arjen
| |
| Jugoslav Dujic 2004-03-31, 7:47 am |
| Håkan Lane wrote:
||
|| Under the standard, it just means "something went wrong". The standard
|| specifies the sign of iostat (for the open statement 0 is success and a
|| positive value is failure). It's up to individual compilers which value
|| corresponds to what sort of problem. If you post your compiler, version
|| and platform then someone here might be able to tell you what 10 means.
|
| Sorry. I should have thought about doing that. I'm using Compaq Visual
| Fortran 6.6B on Win2000.
Ah, last time it was pgf90 on RedHat :-D ?
<quote>
severe (10): Cannot overwrite existing file
FOR$IOS_CAVOVEEXI. Specified file xxx already exists when OPEN statement
specified STATUS='NEW' (create new file) using I/O unit x. Make sure correct
file name, directory path, unit, and so forth were specified in the source
program. Decide whether to:
a.. Rename or remove the existing file before rerunning the program.
b.. Modify the source file to specify different file specification, I/O unit,
or OPEN statement STATUS.
</quote>
--
Jugoslav
___________
www.geocities.com/jdujic
Please reply to the newsgroup.
You can find my real e-mail on my home page above.
| |
| John Appleyard 2004-03-31, 7:47 am |
| Håkan Lane wrote:
[color=darkred]
> Sorry. I should have thought about doing that. I'm using Compaq Visual
> Fortran 6.6B on Win2000.
>
>
Could it be
severe (10): Cannot overwrite existing file
FOR$IOS_CAVOVEEXI. Specified file xxx already exists when OPEN statement
specified STATUS='NEW' (create new file) using I/O unit x. Make sure
correct file name, directory path, unit, and so forth were specified in
the source program. Decide whether to:
Rename or remove the existing file before rerunning the program.
Modify the source file to specify different file specification, I/O
unit, or OPEN statement STATUS.
--
John Appleyard - (send email to john!news@.. rather than spamtrap@..)
Polyhedron Software
Programs for Programmers - QA, Compilers, Graphics, Consultancy
********* Visit our Web site on http://www.polyhedron.co.uk/ *********
|
|
|
|
|