I'm attempting to create a batch job that will transfer a PDS file and it''s members from one mainframe LPAR running CoZ/SFTP to another. The files are transfered but it doesn't appear my options are being used. The file ends up on the target LPAR as sequential files (one file for each PDS member) with different blksize/lrecl. Here is my jcl
//SFTPPUT EXEC PROC=SFTPPROC
//SFTPIN DD *
pwdsn="myuserid.PASSWD(SITE1)"
user=MYUSERID
port=2222
host=plexut-u0
zopts="mode=text,dsntype=pds,lrecl=80,blksize=3120,recfm=fb,space=cyl.3.1"
lzopts="mode=text"
rfile="//MY.FILE.NETWORK.COZ.JCL"
lfile="//MY.FILE.NETWORK.COZ.JCL(*)"
. $script_dir/sftp_put.sh
//
Any ideas what I am doing wrong?
SFTP PDS file from one z/OS CoZ LPAR to another
Re: SFTP PDS file from one z/OS CoZ LPAR to another
It is a little tricky to upload / copy all members to a new remote PDS.
You really have to create/allocate the PDS by copying one member, and then copy the rest using a wild card.
Here is an example that uses a dummy one-line text file to create a DUMMY member:
An alternative would be to do the first put of a known member of the PDS:
You really have to create/allocate the PDS by copying one member, and then copy the rest using a wild card.
Here is an example that uses a dummy one-line text file to create a DUMMY member:
(note also that I added "dir=10")...
lzopts="mode=text"
zopts="mode=text,dsntype=pds,lrecl=80,recfm=fb,space=cyl.3.1,dir=10"
lfile="//KIRK.COZ.TESTJCL(*)"
rfile="//KIRK.COZ.TESTJCL2"
. $script_dir/sftp_connect.sh <<EOB
lzopts $lzopts
zopts $zopts
put dummy.txt $rfile(DUMMY)
put $lfile $rfile
ls -al $rfile
EOB
An alternative would be to do the first put of a known member of the PDS:
...
lzopts="mode=text"
zopts="mode=text,dsntype=pds,lrecl=80,recfm=fb,space=cyl.3.1,dir=10"
lfile="//KIRK.COZ.TESTJCL"
rfile="//KIRK.COZ.TESTJCL2"
. $script_dir/sftp_connect.sh <<EOB
lzopts $lzopts
zopts $zopts
put $lfile(KNOWN) $rfile(KNOWN)
put $lfile(*) $rfile
ls -al $rfile
EOB
Re: SFTP PDS file from one z/OS CoZ LPAR to another
Thanks. I'll give it a shot.