COZ sftp get problem

A discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

COZ sftp get problem

Post by cagatayucuzal » Wed Jul 12, 2017 8:42 am

Hello,
we want get from unix or windows to zos,

On the jcl allocate dataset lrecl=80
but file will get 160

we tried get like this

lzopts= replace
the file was getted but lrecl did not changed.


in ftp job when we add replace comment it automaticly alocate file from getted

is there any solution?


Regards
Cagatay

cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: COZ sftp get problem

Post by cagatayucuzal » Thu Jul 13, 2017 5:12 am

The problem is different

ftp and cozsftp get same dataset lrecl

ftp dataset like this lrecl 150

1 600

cozsftp dataset lrecl 150
1 150
151 300
301 450
450 600

is there any problem?

dovetail
Site Admin
Posts: 1848
Joined: Thu Jul 29, 2004 12:12 pm

Re: COZ sftp get problem

Post by dovetail » Thu Jul 13, 2017 9:55 am

Please post a sample of the JCL and script that you are using, so that we can understand your question better.

If you are doing a "get" where the target is an existing dataset and you want to change the DCB information, you will first need to delete the dataset first.

The "replace" option only allows you to overwrite an existing dataset, using the same allocation and DCB information.

cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: COZ sftp get problem

Post by cagatayucuzal » Fri Jul 14, 2017 1:41 am

soryy for our misunderstanding

our last problem ;

our first JCl;
//SFTP EXEC PROC=SFTPPROC
//SFTPIN DD *
pwdsn="COZUSER.COZ.SAMPJCL(PW)"
user=myuser
host=myhost
lfile=//HLQ.DSN1
rfile=/remote/file1
lzopts= mode=text,linerule=crlf,....

. $script_dir/sftp_gett.sh


after we change this because of multiple file put and get




//SFTP EXEC PROC=SFTPPROC
//SFTPIN DD *
pwdsn="COZUSER.COZ.SAMPJCL(PW)"
user=myuser
host=myhost

. $script_dir/sftp_connect.sh << EOB
lzopts= mode=text,linerule=crlf,....
get /remote/file1 //HLQ.DSN1

EOB




after we change JCL second type, we get end of line error. my question how we can use lzopts option with sftp_connect?


regards
Cagatay

dovetail
Site Admin
Posts: 1848
Joined: Thu Jul 29, 2004 12:12 pm

Re: COZ sftp get problem

Post by dovetail » Fri Jul 14, 2017 2:52 pm

lzopts in the sftp_connect case is just a command. So you don't have an "=" after it.

Just:

lzopts mode=text,linerule=crlf,....

Post Reply