Windows CLI SFTP ?

A discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
Posts: 10
Joined: Thu Jun 25, 2020 9:18 am

Windows CLI SFTP ?

Post by LIonel_Dyck » Thu Jul 09, 2020 1:19 pm

Using the Windows sftp command, either the native windows sftp or the windows/linux sftp, is there a way to instruct it to do a text mode transfer?

For example - my command: sftp me@'userid.pds(member)' member.txt

This always results in a binary download which is the sftp default. Is there an option that will enable text mode transfers?

Posts: 383
Joined: Fri Jul 30, 2004 5:29 pm

Re: Windows CLI SFTP ?

Post by SteveGoetze » Fri Jul 10, 2020 12:46 pm

You will want to send a "mode=text" option request to the Co:Z sftp-server. As you've discovered, mode=binary is the default.

To do this from the OpenSSH client on linux or Windows, you would do this:

Code: Select all

$ sftp me@
sftp> ls /+mode=text
sftp> get //userid.pds(member) member.txt
You can look at the options in effect by issuing the ls /+ command by itself:

Code: Select all

sftp> ls /+
/+/clientcp=ISO8859-1  /+/error.log           /+/gdgnt               /+/loglevel=F          /+/mode=text           /+/servercp=IBM-1047   
From this listing you can see that you can easily specify the code pages used for text mode translation. This section of the user's guide: describes setting the options from the client. This section describes all of the options available:

Post Reply