PDS members are being transmitted as a PS files

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
rakesh
Posts: 6
Joined: Tue Apr 21, 2020 12:24 pm

PDS members are being transmitted as a PS files

Post by rakesh »

Hi,

I am trying to transmit a PDS to remote Lpar using below JCL. RAKESH.TEST.PDS is a PDS with multiple members.

//SFTPPAYL EXEC PGM=COZBATCH,PARM='/ /bin/sh'
//SYSOUT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDIN DD *
coz_bin=""/opt/lpp/coz/bin""
ruser=xxxxxx
server="L2.mf.xxxxxx.net"
ssh_opts=""-oConnectTimeout=60""
$coz_bin/cozsftp $ssh_opts -b- $ruser@$server <<EOB
lzopts mode=text,lrecl=80,space=trk.3,recfm=FB,blksize=8000
put //RAKESH.TEST.PDS //RAKESH.TEST.PDS
EOB
//*

The completes with RC=0 but at the remote side is see all the members of the PDS gets created as a PS files. Meaning if i have test, test1, test2 and test3 as PDS members, i see RAKESH.TEST.PDS.TEST, RAKESH.TEST.PDS.TEST1, RAKESH.TEST.PDS.TEST2 AND RAKESH.TEST.PDS.TEST3 files at the remote. Not the PDS i wanted RAKESH.TEST.PDS.

ZosSettingsÝI¨: Transfer options: blksize=8000,clientcp=IBM-1047,lrecl=80,mode=text,recfm=FB,servercp=IBM-1047,space=trk.3,trim
ZosDatasetÝI¨: Opening dataset RAKESH.TEST.PDS(TEST) for read with options: shr
ZosDatasetÝI¨: Closing dataset //RAKESH.TEST.PDS(TEST) - 1 records read, 63 bytes sent
ZosSettingsÝI¨: Transfer options: blksize=8000,clientcp=IBM-1047,lrecl=80,mode=text,recfm=FB,servercp=IBM-1047,space=trk.3,trim
ZosDatasetÝI¨: Opening dataset RAKESH.TEST.PDS(TEST1) for read with options: shr
ZosDatasetÝI¨: Closing dataset //RAKESH.TEST.PDS(TEST1) - 40 records read, 1162 bytes sent
ZosSettingsÝI¨: Transfer options: blksize=8000,clientcp=IBM-1047,lrecl=80,mode=text,recfm=FB,servercp=IBM-1047,space=trk.3,trim
ZosDatasetÝI¨: Opening dataset RAKESH.TEST.PDS(TEST2) for read with options: shr
ZosDatasetÝI¨: Closing dataset //RAKESH.TEST.PDS(TEST2) - 14 records read, 254 bytes sent

Please help. Let me know if you need any additional details from me.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: PDS members are being transmitted as a PS files

Post by dovetail »

What version of Co:Z SFTP client and server are you running?

What is happening is that this:

using the "put //source //target" command in cozsftp where the source file is a PDS, we will treat that as a directory and try to send all of the members as individual files.

In this case, the //target dsn is being treated as a "psuedo directory" in data set space. This is because you apparently have other lower-level data sets with names like: ////RAKESH.TEST.PDS.A. Alternatively you might be running a really old version of cozsftp, which had problems in this area.
See this for more information: https://dovetail.com/docs/sftp/dsn-determination.html

If you want to send entire PDS datasets at one time, I suggest that you look at the "dsput" command. In R6.0.0 we enhanced this to support PDS and PDS/E datasets, and we use IEBCOPY internally to unload/reload the entire library.
rakesh
Posts: 6
Joined: Tue Apr 21, 2020 12:24 pm

Re: PDS members are being transmitted as a PS files

Post by rakesh »

Hi,

Source:
Co:Z SFTP version: 5.6.0 (6.4p1) 2019-08-20
Copyright (C) Dovetailed Technologies, LLC. 2008-2019. All rights reserved.

Remote:
CoZBatchÝN¨: version: 5.6.0 2019-08-20
CoZBatchÝN¨: Copyright (C) Dovetailed Technologies, LLC. 2005-2019. All rights r

I tried using 'dsput' and i get below error.
CatalogSearchÝE¨: getAllocationSettings() not supported for dsn=RAKESH.TEST.PDS dsorg=PO
Ý99.613¨ stat //RAKESH.TEST.PDS: not found

Changed it to PDSE and still got the same error.
CatalogSearchÝE¨: getAllocationSettings() not supported for dsn=RAKESH.TEST.PDS dsorg=PO-E
Ý99.613¨ stat //RAKESH.TEST.PDS: not found

dsput is only working for PS files.

I got a workaround for now. I am just allocating the PDS file before i do a PUT.
$coz_bin/cozsftp $ssh_opts -b- $ruser@$server <<EOB
zopts lrecl=80,blksize=8000,recfm=fb,dsntype=library,dsorg=po
zopts space=cyl.1.1
mkdir //RAKESH.TEST.PDS
put //RAKESH.TEST.PDS/*\
//RAKESH.TEST.PDS
EOB
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: PDS members are being transmitted as a PS files

Post by dovetail »

Support for sending entire PDS and PDS/E data sets was added in R6.0.0.
Both sides must be at this level for this to be enabled.
See the release notes here: https://dovetail.com/docs/cozinstall/changes.html
rakesh
Posts: 6
Joined: Tue Apr 21, 2020 12:24 pm

Re: PDS members are being transmitted as a PS files

Post by rakesh »

Thanks lot for the details.

I will ask my support team if they can upgrade the version to 6. Till then i will use the workaround i found.
Post Reply