How to pass Carriage Return Line Feed

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
jbourq
Posts: 3
Joined: Tue Dec 04, 2018 4:09 pm

How to pass Carriage Return Line Feed

Post by jbourq »

We are converting SFTP processes to begin using Co:Z SFTP from our Mainframe :D . For this particular Client conversion, we are currently passing and retrieving encrypted files. When the files are decrypted, each record on the file ends with a Carriage Return Line Feed (CRLF). With this conversion to Co:Z SFTP, we are eliminating the use of encrypted files and will start passing/retrieving .TXT files. However, each record on the .TXT files ends with only a Line Feed character. At the Client end, this is failing their format check. Is there an option I can set in Co:Z to have each record end with a CRLF instead of a Line Feed?
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Re: How to pass Carriage Return Line Feed

Post by coz »

Hello,

I'm assuming that you are referring to transfers *from* z/OS to a remote platform. To get what you are looking for, you should set the Co:Z linerule to "crlf". Here are the two scenarios:

1.) You are issuing a put from the cozsftp z/OS client:

Code: Select all

cozsftp> lzopts mode=text,linerule=crlf
 linerule=crlf    mode=text       
cozsftp> put myfile.txt remote.txt
2.) You are issuing a get from the remote sftp client after connecting to the Co:Z sftp server on z/OS

Code: Select all

sftp> ls /+mode=text,linerule=crlf
/+mode=text,linerule=crlf    
sftp> get myzos.txt local.txt
Post Reply