CARRIAGE RETURN/lf issue with FTP

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
phaniyelugula
Member
Posts: 20
Joined: Mon Dec 30, 2013 6:03 pm

CARRIAGE RETURN/lf issue with FTP

Post by phaniyelugula » Tue Feb 09, 2016 4:05 pm

Upto now we are transferring file from our mainframes to Windows system(Client system) via Normal FTP. My Client is receving the file with "Carriage Return"(CR) and "Line Feed"(LF) at the end of each file..

Now we are changing the transfer mechanism to sFTP..Below are the steps I am following
1. Copy the PS file to OMVS system of Mainframe.
2. Run the sFTP commands and send the file to Client system.

Now the problem is.. along with the data my client is only receiving LF at the end of each line..CR is missing.. I have tried options like "ascii dos unix" in the sftp script and "SBSENDEOL CRLF" in JCL..But no luck

Below is the script i am running

Code: Select all

ascii
lcd /u/myid
put File1.txt FileNew1.txt
chmod 775 FileNew1.txt
quit
Below is how they expect the file to be

Image

But this is how the file is received when I run the script I have pasted above

Image

Please let me know if there is option to achieve CR and LF.[/img]

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Tue Feb 09, 2016 6:21 pm

Have you tried "man ftp" in your OMVS?

phaniyelugula
Member
Posts: 20
Joined: Mon Dec 30, 2013 6:03 pm

Post by phaniyelugula » Wed Feb 10, 2016 10:02 am

Thanks for replying William..
No I haven't tried "man ftp", I have to used sFTP only since it is recommended by my organization..

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others