Co:Z SFTP batch mainframe to mainframe

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
jpmccarth56
Posts: 1
Joined: Tue Feb 16, 2016 3:36 pm

Co:Z SFTP batch mainframe to mainframe

Post by jpmccarth56 »

Hi, I'm running a test job to do a transfer from LPAR to LPAR...

//SFTPPUT EXEC SFTPPROC
//SFTPIN DD *
pwdsn="SYS1.COZ.SAMPJCL(PW)"
user=a2jmcy9
host=mvsnb31
lfile=//DD:INDD
rfile=//DD:MYDD

. $script_dir/sftp_put.sh

//INDD DD DSN=A2JMCY9.NETSTAT.CONFIG,DISP=SHR
//MYDD DD DSN=A2JMCY9.SFTP.RFILE,DISP=(NEW,CATLG,DELETE),UNIT=DISK,
// SPACE=(CYL,(1,1),RLSE),RECFM=FB,DSORG=PS,LRECL=80

the batch job completes successfully and creates the target dataset (MYDD) on the remote LPAR. the problem is that the dataset is empty. the log shows the number of records read and number of bytes written, but the file is empty. I can't figure out what I'm missing?

Thanks,
John


Forgot to include the output of my job...

CoZBatch[N]: Copyright (C) 2005-2013 Dovetailed Technologies LLC. All rights reserved.
CoZBatch[N]: version 3.6.0 2015-12-08
CoZBatch: executing progname=login-shell="-/bin/sh"
Connect using SSH_ASKPASS, password will be read from SYS1.COZ.SAMPJCL(PW)...
Executing: /apps/CoZ/bin/cozsftp -oBatchMode=no -oConnectTimeout=60 -oServerAliveInterval=60 -oNumberOfPasswordPrompts=
3 -oStrictHostKeyChecking=no -oConnectTimeout=60 -oServerAliveInterval=60 -oStrictHostKeyChecking=no -b-
'a2jmcy9@mvsnb31'
Co:Z SFTP version: 3.6.0 (6.4p1) 2015-12-08
Copyright (C) Dovetailed Technologies, LLC. 2008-2014. All rights reserved.
Connecting to mvsnb31...
/apps/CoZ/bin/read_passwd_dsn.sh prompt: "a2jmcy9@mvsnb31's password: "
fromdsn(SYS1.COZ.SAMPJCL(PW))[N]: 1 records/80 bytes read; 9 bytes written in 0 milliseconds.
Connected to mvsnb31.
Connection established, local_addr=10.195.251.33 local_port=0 remote_addr=10.195.251.34 remote_port=22
ZosSettings: Transfer options: gdgnt,mode=text,notify,trim,trtab=STANDARD
ZosDataset: Opening dataset DD:INDD for read
cozsftp>
cozsftp> put //DD:INDD //DD:MYDD
Uploading //DD:INDD to //DD:MYDD
ZosDataset: Closing dataset //A2JMCY9.NETSTAT.CONFIG - 95 records read, 3222 bytes sent
CoZBatch: returning rc=exitcode=0
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Co:Z SFTP batch mainframe to mainframe

Post by dovetail »

You can't upload to a DD (MYDD) on a remote system. After all, how would it be allocated?

Take a look at the Co:Z SFTP server session log on the remote system to see what actually happened.
Post Reply