On Wednesday 09 July 2008 13:00, Szwed, Tomasz A CIV USMEPCOM wrote:
> I have a file on Unix server.  When I transfer that file from Unix to Linux
>using FTP - I'm getting file with the same size.
>When I use SFTP, I'm getting file smaller by 79 bytes.  The file has 79
>lines.
>That file is then FTP from Linux to z/OS - using FTP batch job on z/OS
> (using "get" command).
>The file which was FTP-ed (from Unix to Linux) can be read on z/OS, the file
>which was SFTP-ed (from Unix to Linux) shows only first line.
>When I used "set list" command (vi editor on Linux) - I can see "$" (end of
>line character) on both files (in the same column).
>
>1.  How can I find out which character is lost during SFTP process? (I'm
>assuming that some control character is lost).  How can I get that file
> using SFTP without losing any characters?

You can use the od (octal dump) command on UNIX or Linux to look at the values
of each byte in the file.  Use the -c option to output printable ASCII
characters as themselves, carriage-return and newline as "\r" and "\n", and
other control characters as octal values.  For example:
        od -c myfile | less

>2.  Any other suggestion how to go around the problem? - I have to use the
>file which was SFTP-ed from Unix to Linux on z/OS (I cannot use the FTP-ed
>file).

Transfer the file in BINARY mode instead of ASCII.  Use the "bin" command in
your FTP client to do that.
        - MacK.
-----
Edmund R. MacKenty
Software Architect
Rocket Software, Inc.
Newton, MA USA

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to