SFTP unix file to mainframe

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
AdriaanOlivier
Posts: 1
Joined: Thu Jun 19, 2014 4:46 am

SFTP unix file to mainframe

Post by AdriaanOlivier »

Hi

I am trying to send and file from omvs unix file in z/os to another z/os System. If i use mode=binary i get the data with alot of spaces and if i use mode=text i get a lot of @@@@@@@@@@ and other stuff. I just want to transfer the file as in unix to the other z/os data set as is ....i tried ls /+notrim and ls /+lrecl=80,recfm=fb,blksize=800,space=cyl.3.1
. Everytime I use mode=text i get @@@@@ and other stuf in the remote data that gets created. Everytime i use mode=binary i get space in my remote data set. Please help

Here is my jcl step

//STEP1 EXEC PGM=BPXBATCH,
// PARM='sh sftp -b /.ssh/command SFTPTCP@172.28.2.3'
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*

and this is in /.ssh/command

ls /+mode=text,lrecl=80,recfm=fb
or
ls /+lrecl=80,recfm=fb

I have tried multiple option here i cant get the exact Unix file to put to and Mainframe Data set. Please Help

Regards
Adriaan Olivier
South Africa
dovetail
Site Admin
Posts: 2025
Joined: Thu Jul 29, 2004 12:12 pm

Re: SFTP unix file to mainframe

Post by dovetail »

In you example you are using IBM Ported Tools sftp client, not the CO:Z SFTP client.

If you want to use the CO:Z SFTP client, see this part of the Co:Z User's Guide for examples:
http://dovetail.com/docs/sftp/client.html#client-batch
Post Reply