From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,a18c782bd6789eca X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-11-15 22:18:27 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!csn!news.sinet.slb.com!maggie.austin.wireline.slb.com!hermes.ridgefield.sdr.slb.com!usenet From: lovell@sdr.slb.com (John Lovell) Newsgroups: comp.sys.dec Subject: Re: byte swapping to get data readable on a dec Date: 16 Nov 1994 04:06:29 GMT Organization: Schlumberger-Doll Research, Ridgefield, CT Distribution: world Message-ID: <3ac0g5$sns@hermes.ridgefield.sdr.slb.com> References: Reply-To: lovell@sdr.slb.com NNTP-Posting-Host: aspen.ridgefield.sdr.slb.com In article 94Nov10084407@larry.gsfc.nasa.gov, ejh@larry.gsfc.nasa.gov (Edward Hartnett) writes: > > We here distribute some floating point (IEEE) data to various > users. We generate it on a cray and various workstations, and now we > have a user who wants to read the data from a fortran program on a > decstation. He complains that he can't do this because of the order > that the bytes are stored in. Is there any hope that we can help him > solve his problem? In the FORTRAN program, open the file as open(file='file.dat', convert='big_endian', form='unformatted',....) and any big_endian integer or IEEE floats will be converted automatically as the files are read in. If all of the unformatted files are big_endian you can alternatively do this at compile time as FORTRAN/CONVERT=BIG_ENDIAN On an AXP, if you compile the Fortran source with the flag /FLOAT=IEEE then everything will be done in IEEE format. Regards, John p.s. there is also a /CONVERT=CRAY option which is big-endian integer and "CRAY" floating point for REAL*8 and COMPLEX*16 (with no single precision).