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-10 12:06:50 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!caen!crl.dec.com!crl.dec.com!jac.zko.dec.com!quark.enet.dec.com!lionel From: lionel@quark.enet.dec.com (Steve Lionel) Newsgroups: comp.sys.dec Subject: Re: byte swapping to get data readable on a decstations Date: 10 Nov 1994 16:07:10 GMT Organization: Digital Equipment Corporation, Nashua NH Distribution: world Message-ID: <39tgfe$i1e@jac.zko.dec.com> References: Reply-To: lionel@quark.enet.dec.com (Steve Lionel) NNTP-Posting-Host: quark.zko.dec.com X-Newsreader: mxrn 6.18-26 In article , 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? Simplicity itself, if he's using a reasonably current version of DEC Fortran. Have him add CONVERT='BIG_ENDIAN' to the OPEN statement for the unit in question - this will cause DEC Fortran to do the byte swapping during unformatted transfers of scalars and arrays (but not RECORDs) automatically. An alternative is to define the environment variable FORT_CONVERTn , where n is the unit number, to BIG_ENDIAN before running the program. This feature is available in DEC Fortran for all supported platforms (RISC ULTRIX, DEC OSF/1 AXP, OpenVMS AXP, OpenVMS VAX, Windows NT AXP). Details vary on the "environment variable" method - see the User Manual for further details. Steve Lionel Mail: lionel@quark.enet.dec.com DEC Fortran Development WWW: http://www.digital.com/info/slionel.html Digital Equipment Corporation 110 Spit Brook Road, ZKO2-3/N30 Nashua, NH 03062-2698 "Free advice is worth every cent" For a summary of Digital's Internet services, send mail to info@digital.com