I am converting from FTP to SFTP using CO:Z SFTP and many of our current FTP jobs transfer multiple files in a single step.
For example:
PUT 'node1.node2.node3.node4(0)' +
abc_d_efgh_%%Y.%%M.%%D%%.TXT
PUT 'nod11.node3.node6.node7(0)' +
xyz_t_uvws_%%Y.%%M.%%D%%.TXT
In each case the mainframe file being transferred is different as is the local file being created. In some jobs I am currently transferring over 50 files in one step, creating 50 different file names on the server.
How is this done under CO?Z SFTP?
Many thanks for your help
Multiple Files in the same mainframe batch step
Re: Multiple Files in the same mainframe batch step
The sftp_connect.sh sample batch script can be used to enter multiple arbitrary commands.
For usage info, see: https://dovetail.com/docs/sftp/client.h ... -batch_jcl
For usage info, see: https://dovetail.com/docs/sftp/client.h ... -batch_jcl
-
- Posts: 40
- Joined: Thu Jun 01, 2017 9:15 am
Re: Multiple Files in the same mainframe batch step
Can you send a sample jcl abot multiple files in the same mainframe batch step?
Regards
Regards
Re: Multiple Files in the same mainframe batch step
Code: Select all
//SFTP EXEC PROC=SFTPPROC
//SFTPIN DD *
pwdsn="COZUSER.COZ.SAMPJCL(PW)"
user=myuser
host=myhost
. $script_dir/sftp_connect.sh << EOB
put //HLQ.DSN1 /remote/file1
put //HLQ.DSN2 /remote/file2
put //HLQ.DSN3 /remote/file3
put //HLQ.DSN4 /remote/file4
put //HLQ.DSN5 /remote/file5
EOB
//
-
- Posts: 40
- Joined: Thu Jun 01, 2017 9:15 am
Re: Multiple Files in the same mainframe batch step
Hello
we use options with sftp_put.sh
lzopts=Ümode=text,clientcp=IBM-1026,servercp=ISO8859-9,linerule=crlfÜ
How to use these settings with sftpconnect.sh?
Regards
Cagatay
we use options with sftp_put.sh
lzopts=Ümode=text,clientcp=IBM-1026,servercp=ISO8859-9,linerule=crlfÜ
How to use these settings with sftpconnect.sh?
Regards
Cagatay
-
- Posts: 40
- Joined: Thu Jun 01, 2017 9:15 am
Re: Multiple Files in the same mainframe batch step
I think I found it
. $script_dir/sftp_connect.sh << EOB
lzopts mode=text,clientcp=IBM-1026,servercp=ISO8859-9,linerule=crlf
put //HLQ.DSN1 /remote/file1
put //HLQ.DSN2 /remote/file2
<< EOB
Thank you
. $script_dir/sftp_connect.sh << EOB
lzopts mode=text,clientcp=IBM-1026,servercp=ISO8859-9,linerule=crlf
put //HLQ.DSN1 /remote/file1
put //HLQ.DSN2 /remote/file2
<< EOB
Thank you
-
- Posts: 40
- Joined: Thu Jun 01, 2017 9:15 am
Re: Multiple Files in the same mainframe batch step
main server: host
remote server: unix
is it same
:
lzops=linerule=lf
sftpget.sh
:
sftpconnect.sh
lzops=linerule=lf->crlf
in our test it is not same., it works with crlf
is that right?
remote server: unix
is it same
:
lzops=linerule=lf
sftpget.sh
:
sftpconnect.sh
lzops=linerule=lf->crlf
in our test it is not same., it works with crlf
is that right?