Multiple Files in the same mainframe batch step

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
mpeck
Posts: 3
Joined: Fri Jun 23, 2017 2:07 pm

Multiple Files in the same mainframe batch step

Post by mpeck »

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
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Multiple Files in the same mainframe batch step

Post by dovetail »

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
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: Multiple Files in the same mainframe batch step

Post by cagatayucuzal »

Can you send a sample jcl abot multiple files in the same mainframe batch step?
Regards
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Multiple Files in the same mainframe batch step

Post by dovetail »

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
//
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: Multiple Files in the same mainframe batch step

Post by cagatayucuzal »

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
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: Multiple Files in the same mainframe batch step

Post by cagatayucuzal »

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
cagatayucuzal
Posts: 40
Joined: Thu Jun 01, 2017 9:15 am

Re: Multiple Files in the same mainframe batch step

Post by cagatayucuzal »

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?
Post Reply