Odd //DD:DOWNLOAD issue

Discussion of the free COZBATCH utility for z/OS
Post Reply
bdanals
Posts: 2
Joined: Thu Mar 12, 2020 7:30 am

Odd //DD:DOWNLOAD issue

Post by bdanals » Thu Mar 12, 2020 8:40 am

We just moved from 1.9 to 5.6 of Co:Z and have found an odd thing.

FTP to our secretary of state and the destination is remotefile="DOSEIV@DOSEIV"

which our put statement:
put //DD:DOWNLOAD $remotefile

and resolves to:
cozsftp> put //DD:DOWNLOAD DOSEIV@DOSEIV
Uploading //DD:DOWNLOAD to /DOSA6360/DOSEIV@DOSEIV

with data transferred..
Opening dataset DD:DOWNLOAD for read
Closing dataset //DD:DOWNLOAD - 9755 records read, 6886722 bytes sent

But there is no actual file name being created, it just sends and they receive the data.

With 5.6 I get....
cozsftp> put //DD:DOWNLOAD DOSEIV@DOSEIV
Uploading //DD:DOWNLOAD to /DOSA6360/DOSEIV@DOSEIV/DD:DOWNLOAD

and:
t: Opening dataset DD:DOWNLOAD for read
remote open("/DOSA6360/DOSEIV@DOSEIV/DD:DOWNLOAD"): No such file or directory

A failed step..
I do have a call in to the secretary of state to find out about their process, maybe i need an actual file name or a better directory that the DOSEIV@DOSEIV resolves to on their side.. but was wondering if anybody has seen this and maybe a work around on our side rather than reworking the whole process??

Thanks in advance!

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

Re: Odd //DD:DOWNLOAD issue

Post by dovetail » Mon Mar 16, 2020 10:10 am

Case 1:

cozsftp> put //DD:DOWNLOAD DOSEIV@DOSEIV
Uploading //DD:DOWNLOAD to /DOSA6360/DOSEIV@DOSEIV

this looks like the remote PWD is "/DOSA6360" and the file is uploaded as expected

Case 2:
cozsftp> put //DD:DOWNLOAD DOSEIV@DOSEIV
Uploading //DD:DOWNLOAD to /DOSA6360/DOSEIV@DOSEIV/DD:DOWNLOAD

This looks like the remote PWD is the same, but there is an existing *directory* named "/DOSA6360/DOSEIV@DOSEIV".
Is this true? If so, the result is also as expected, since sftp will take the local file name and use it as a new file in the remote directory.

bdanals
Posts: 2
Joined: Thu Mar 12, 2020 7:30 am

Re: Odd //DD:DOWNLOAD issue

Post by bdanals » Mon Mar 16, 2020 2:50 pm

//STDIN DD *
coz_bin="/localaps/coz/bin"
remoteuser="DOSA6360"
server="136.181.135.38"
remotefile="DOSEIV@DOSEIV"
export PASSWD_DSN='//SYS2.FTPSEC(SOM)'
export SSH_ASKPASS=$coz_bin/read_passwd_dsn.sh
export DISPLAY=none

ssh_opts="-oBatchMode=no"
ssh_opts="$ssh_opts -oPort=2222"
ssh_opts="$ssh_opts -oConnectTimeout=60"
ssh_opts="$ssh_opts -oServerAliveInterval=60"
ssh_opts="$ssh_opts -oStrictHostKeyChecking=no"

$coz_bin/cozsftp $ssh_opts -b- $remoteuser@$server <<EOB
lzopts mode=binary
ls -1lt
put //DD:DOWNLOAD $remotefile
ls -1lt downloaded
quit

just to fill in the gaps.. :)

Post Reply