From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,a9b2d595f03391a9 X-Google-Attributes: gidfc89c,public X-Google-Thread: f678f,a9b2d595f03391a9 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-08-06 04:48:50 PST Xref: gmd.de comp.unix.osf.misc:374 comp.unix.programmer:7970 Newsgroups: comp.unix.osf.misc,comp.unix.programmer Path: gmd.de!xlink.net!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!dxcern!cernapo!danpop From: danpop@cernapo.cern.ch (Dan Pop ) Subject: Re: Mainframe -> Linux File transfer problem Message-ID: Keywords: Linux, Mainframe, FTP Sender: news@dxcern.cern.ch (USENET News System) Organization: CERN European Lab for Particle Physics References: <9321811.20026@mulga.cs.mu.OZ.AU> Date: Fri, 6 Aug 1993 11:20:44 GMT In <9321811.20026@mulga.cs.mu.OZ.AU> kmng@mundil.cs.mu.OZ.AU (Kui Meng NG) writes: >When a binary file is ftp'ed from a mainframe UNIX machine to a PC with Linux, >( using BINARY mode transfer !) >i think the file gets "scrambled" due to the different architectures/OS . >In particular, i think that it could be because one machine is big endian >and the other little endian. It depends on your definition of "scrambled". If the file on PC is the same as the file on the mainframe, at _character_ level, then it is by no means scrambled. This is exactly what the BINARY mode of ftp is supposed to do. If your binary file contains integer or floating point data, it is not portable across different platforms which use different byte orderings or different representations. In such a case, if portability is a concern, use ASCII files to store your data, instead of binary files. Otherwise, writing a short program to fix the byte ordering on the destination machine should be trivial if you know the internal structure of the file. If you don't, you can simply throw away the file, because it's useless on the destination machine. Dan -- Dan Pop Tel: +41.22.767.2335 Email: danpop@cernapo.cern.ch Mail: CERN - PPE, Bat. 21 1-023, CH-1211 Geneve 23, Switzerland