From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,42a599b4e9a6e39a X-Google-Attributes: gid1164f8,public From: hughett@chaplin.med.upenn.edu (Paul Hughett) Subject: Re: unformatted data conversion problem Date: 1998/11/03 Message-ID: <71lkfo$r4b$1@netnews.upenn.edu>#1/1 X-Deja-AN: 407754943 References: <363DE8DE.A88F6754@lanl.gov> Organization: University of Pennsylvania Newsgroups: comp.sys.dec 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