Re: help for reading a binary file



[reading back an unformatted data file with a program compiled with a
different Fortran does not work]

To Arjen: The total size of the data file is 10 bytes more for that of
the required data. I guess that there are some extra bytes to identify
the records. I will try to do some tests according to your advice, but
I don't know if I could solve it so soon.

You can not expect to read unformatted files written by compiler X with
compiler Y.

To Clive Page: in fact, I'm a new hand in Fortran, so I just know some
basic operations of lf95, which is on hand. I will try to use the g95.

Look at the data file with a file editor. Locate the non data bytes
before and after each record. Use stream i/o as in g95. Read the
non-data prefix bytes. Read the data. Read the non-data suffix bytes.
Lather, rinse, repeat.

As I mentioned, I just touched Fortran and I have such an urgent task.
Any detailed help such as some lines of codes will be appreciated a lot!

"Adding manpower to a late software project makes it later." (Fred
Brooks).

.



Relevant Pages

  • Re: Problems with CLAPACK SVD routines on OS X
    ... I wanted to run this code of yours (I have lapack libraries installed on ... but incomplete type ... So let us what warnings you get from your compiler and send an example ... data file as well and then I will try again. ...
    (sci.math.num-analysis)
  • Re: COBOL file dump...
    ... I think you're off by 1 in the location, since the D indicates minus (a C ... You might want to pick up a good book on COBOL, along with the compiler ... reference for the version that produced your data file. ... > In a file from a COBOL dump, which is in ASCII, one of the fields is ...
    (microsoft.public.sqlserver.programming)
  • Re: COMP-3 Questions
    ... COBOL compiler. ... receives a data file which is defined by a COBOL copybook, ... Cannot be done without knowing the compiler and/or knowing if the elementary ... You can dig up a little more info with these free downloads: ...
    (comp.lang.cobol)