From: hughett@chaplin.med.upenn.edu (Paul Hughett)
Subject: Re: unformatted data conversion problem
Date: 1998/11/03 [thread overview]
Message-ID: <71lkfo$r4b$1@netnews.upenn.edu> (raw)
In-Reply-To: 363DE8DE.A88F6754@lanl.gov
jim harsh (harsh@lanl.gov) wrote:
: I have a large number of data files that were written on VAX/VMS
: with fortran as unformatted data, The data is floating point data.
: I have tried to use fortran on our alpha platform running DECUnix
: to convert the data. I used the convert option for the open
: staement and I have tried the convert option during compile.
: Neither work. If I do an OD before and after, nothing is changed,
: regadless of the option used.
: If I try to manually swap the byte order, I can get can get close to
: the proper values.
: Any ideas concerning the conversion of unformatted floating point data
: from a VMS system to Unix floating point data?
Yes. The VAX uses its own format(s) for floating point data. So look
up the details of the most likely format, read the data byte by byte,
twiddle the bits as necessary to convert to the native float format on
the machine reading the data, then either use the data or write it
back out in the native format. This could probably be done in FORTRAN
but would be easier in C, once you know the VAX format; you will need
to have a reasonable understanding of machine architecture and
assembly language, although not the ability to actually write
assembler. Better yet, find someone who's already done this and ask
if you can use his code.
If you can't find the VAX floating point formats, let me know; I have
them around here someplace and should be able to make you a copy.
Paul Hughett
next prev parent reply other threads:[~1998-11-03 5:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-02 5:00 unformatted data conversion problem jim harsh
1998-11-03 5:00 ` Paul Hughett [this message]
1998-11-03 5:00 ` Steve Lionel
1998-11-04 5:00 ` jim harsh
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox