Error in my FORTRAN program

I have a Fortran program and I am writing out to logical unit 7. The program is reading from a text file and writing to the new file formatted. It gets through the read and writes some to the file but then stops with the following error:

1525-013 The sequential WRITE statement cannot be completed because an errno value of 25 (Not a typewriter) was received while writi
ng the file ACA_TRANSMIT.XML. The program will stop.

I have looked for the error and can only discern it is some type of I/O error, but I cannot find a way to resolve it.

There are many WRITE statements and quite a lot of FORMAT statements, so I'm not sure where to begin. If the source file is changed, the program stops at different places in the write.

I am running a combo FORTRAN77/90 on UNIX AIX editor.

We can't see your computer from here. It's difficult to even guess without seeing the code.

There is over 1200 lines of code and I have no idea what would be helpful for you to see. The output always stops at 203 lines and 8192 characters, with a "last line not complete" message. They are not necessarily the same 203 lines, however, as there is some conditions for the output. As I mentioned, if I change the conditions, it writes different data, but always 203 lines and 8192 characters and then stops. I was hoping someone could give me a better explanation of what the error message means...

"8192 characters" is interesting. That's a power of two, likely the precise size of some buffer in the program or OS.

If you're not willing to post the program, I'll say that what's being written to and how is probably more interesting and relevant than where the program breaks down. That, I suspect, is where the error arises.

Beyond that, without seeing the program, we are truly wild guessing.

It is interesting that you say that. I have a rather large loop with multiple conditions and when I comment out that loop, the program runs and writes to the end. I am going to re-write the loop and see if that resolves the issue. Perhaps it is overloading the buffer.

write() shouldn't be failing though, unless the file itself is invalid. What's writing to it is probably less interesting and relevant than what's being written to.