View previous topic :: View next topic |
Author |
Message |
tvssv Beginner
Joined: 11 Mar 2009 Posts: 58 Topics: 25
|
Posted: Thu Sep 10, 2020 10:51 am Post subject: FTP issue |
|
|
Hi,
I am transmitting the file (FB, LEN 225) from MVS to UNIX server through ftp. This file contains only text. The receiver in UNIX says that all lines in the file they received contains ^M junk character at the end of each line. How to avoid this junk character. I have used ASCII in ftp script as it is text file. Please suggest how to get rid of ^M junk character at the end of each line.
Thanks _________________ Thanks
TVSSV |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
kolusu Site Admin
![Site Admin Site Admin](images/ranks/adminpic.jpg)
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Thu Sep 10, 2020 11:38 am Post subject: Re: FTP issue |
|
|
tvssv wrote: | Hi,
I am transmitting the file (FB, LEN 225) from MVS to UNIX server through ftp. This file contains only text. The receiver in UNIX says that all lines in the file they received contains ^M junk character at the end of each line. How to avoid this junk character. I have used ASCII in ftp script as it is text file. Please suggest how to get rid of ^M junk character at the end of each line.
Thanks |
tvssv,
(^M) is a blue carriage return character to denote the new line. It looks like the file is actually sent to Windows which will have a special carriage return character (CR+LF) at the end of lines to denote a line return or newline, which will be displayed incorrectly in Linux (^M).
So make sure that you indeed transferred directly to Unix server _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
tvssv Beginner
Joined: 11 Mar 2009 Posts: 58 Topics: 25
|
Posted: Thu Sep 10, 2020 11:22 pm Post subject: |
|
|
Hi Kolusu,
Thank You.
I am transmitting the file directly from MVS to UNIX server through jcl. But still they are saying the file is displaying ^M junk character. _________________ Thanks
TVSSV |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Robert Sample Beginner
Joined: 15 Dec 2009 Posts: 12 Topics: 0 Location: Atlanta
|
Posted: Fri Sep 11, 2020 10:55 am Post subject: |
|
|
The ^M is X'0D' (or 13 in decimal which is a carriage return -- CR -- in the ASCII collating sequence) and was achieved by sending your data set to the Unix machine with SBSENDEOL=CRLF option of FTP on the mainframe. Since z/OS does not use record terminators, when you FTP data from a mainframe to a Unix or Windows machine, z/OS FTP inserts the appropriate end of line (EOL) characters -- CRLF for Windows, LF for Unix. What you are seeing is the CR piece of the CRLF Windows line terminator (since Unix accepts the LF as its line terminator). Try adding Code: | LOCSITE SBSENDEOL=LF | to your FTP commands before the PUT. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|