From owner-freebsd-questions Tue Feb 20 13:43:31 2001 Delivered-To: freebsd-questions@freebsd.org Received: from nameserver.austclear.com.au (nameserver.austclear.com.au [192.83.119.132]) by hub.freebsd.org (Postfix) with ESMTP id 50CB437B401 for ; Tue, 20 Feb 2001 13:43:18 -0800 (PST) (envelope-from ahl@austclear.com.au) Received: from tungsten.austclear.com.au (tungsten.austclear.com.au [192.168.70.1]) by nameserver.austclear.com.au (8.9.3/8.9.3) with ESMTP id IAA93103; Wed, 21 Feb 2001 08:43:17 +1100 (EST) Received: from tungsten (tungsten [192.168.70.1]) by tungsten.austclear.com.au (8.9.3/8.9.3) with ESMTP id IAA03472; Wed, 21 Feb 2001 08:43:16 +1100 (EST) Message-Id: <200102202143.IAA03472@tungsten.austclear.com.au> X-Mailer: exmh version 2.1.1 10/15/1999 To: "Fee, Doug" Cc: "'freebsd-questions@freebsd.org'" Subject: Re: FTP to Mainframe Question In-Reply-To: Message from "Fee, Doug" of "Tue, 20 Feb 2001 14:10:46 MDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 21 Feb 2001 08:43:16 +1100 From: Tony Landells Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi Doug, Let me make sure I understand what you're doing first... The file you're trying to transfer is basically a text file (as in it has newlines at the end of each line) with all the lines the same length. You're (presumably) generating the file on FreeBSD, and you're transferring it to a mainframe that uses EBCDIC, but when it gets there it still has the (converted) newlines which is stuffing up the mainframe. In theory, if you use ASCII transfer mode in FTP it should do the end-of-line conversion for you (including throwing it away completely if you're transferring to a record-oriented OS), but I don't know how well that would work if you've already converted the file to EBCDIC on the UNIX system. But IF you've been using binary mode, try ASCII and see what happens. The other option is to strip the newlines before you send your file. You can do this quite effectively in dd using the "conv=block" option combined with the "cbs" option. Supposing that all your records are 60 characters (61 including the newline), then the command is "dd if=infile of=outfile cbs=60 conv=block,ebcdic". Of course, I can't really test this, so you'll have to try it out, but it's worked for me in other circumstances. Cheers, Tony -- Tony Landells Senior Network Engineer Ph: +61 3 9677 9319 Australian Clearing Services Pty Ltd Fax: +61 3 9677 9355 Level 4, Rialto North Tower 525 Collins Street Melbourne VIC 3000 Australia To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message