MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTP issue

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
tvssv
Beginner


Joined: 11 Mar 2009
Posts: 58
Topics: 25

PostPosted: Thu Sep 10, 2020 10:51 am    Post subject: FTP issue Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Thu Sep 10, 2020 11:38 am    Post subject: Re: FTP issue Reply with quote

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 - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tvssv
Beginner


Joined: 11 Mar 2009
Posts: 58
Topics: 25

PostPosted: Thu Sep 10, 2020 11:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Robert Sample
Beginner


Joined: 15 Dec 2009
Posts: 12
Topics: 0
Location: Atlanta

PostPosted: Fri Sep 11, 2020 10:55 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group