Get multiple files using a wild-card pattern to a GDG

Discussion of the free COZBATCH utility for z/OS
DianaAsencio
Posts: 5
Joined: Thu Mar 16, 2017 2:11 pm

Get multiple files using a wild-card pattern to a GDG

Postby DianaAsencio » Thu Mar 16, 2017 2:22 pm

I can unable to create GDG, can you help me out:

cozsftp> cd /u/sftpedi/in/exact
cozsftp> ls -al
drwxr-xr-x 2 SFTPSAP TTY 8192 Mar 13 17:20 .
drwxr-xr-x 4 SFTPSAP TTY 8192 Mar 7 17:34 ..
-rwxrwxrwx 1 SFTPSAP TTY 0 Mar 9 19:57 EDI.ASN.170307.T120001
-rwxrwxrwx 1 SFTPSAP TTY 148969 Mar 9 19:50 EDI.ECHO.D170307.T120001
cozsftp> lpwd
Local working directory: /u/sydiana
cozsftp> lcd //SYDIANA.SFTPEDI.GDGROUP1
cozsftp> lls -al
Volume Referred Ext Tracks Used Recfm Lrecl BlkSz Dsorg Dsname
QW0037 2017/03/10 1 5 1 VB 1024 6144 PS SYDIANA.SFTPEDI.GDGROUP1.G0001V00
cozsftp> lzopts gdgnt
gdgnt
cozsftp> pwd
Remote working directory: /u/sftpedi/in/exact
cozsftp> get /u/sftpedi/in/exact/EDI.* //SYDIANA.SFTPEDI.GDGROUP1(+1)
Ý29.729¨ Multiple files match, but "//SYDIANA.SFTPEDI.GDGROUP1(+1)" is not a directory <----- not sure why it is not recognizing gdg base ?????
CoZBatchÝI¨: returning rc=exitcode=1

Can someone help?
thanks

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

Re: Get multiple files using a wild-card pattern to a GDG

Postby dovetail » Fri Mar 17, 2017 2:33 pm

Hi Diana,

Welcome to the forum. In the future, please ask CO:Z SFTP questions in the Co:Z SFTP forum.

Regarding your question about downloading multiple files to GDG generations: what version of Co:Z SFTP are you using?
As documented here, 2.4.0 or later is required for this feature: https://dovetail.com/docs/sftp/client.h ... t-ds_trans

If you are using 2.4.0 or later, then please capture a trace and post your output:

# insert these lines in your script before executing cozsftp
export COZ_LOG=F
sftp_opts="$sftp_opts -vvv"

DianaAsencio
Posts: 5
Joined: Thu Mar 16, 2017 2:11 pm

Re: Get multiple files using a wild-card pattern to a GDG

Postby DianaAsencio » Mon Mar 20, 2017 11:52 am

we are running o:Z SFTP version: 2.2.1 (5.0p1) 2012-10-08
the output is large, can i attach it some how to this ticket?

DianaAsencio
Posts: 5
Joined: Thu Mar 16, 2017 2:11 pm

Re: Get multiple files using a wild-card pattern to a GDG

Postby DianaAsencio » Mon Mar 20, 2017 12:01 pm

here is the results:
gdgnt
cozsftp> pwd
Remote working directory: /u/sftpedi/in/exact
cozsftp> get /u/sftpedi/in/exact/EDI.* //SYDIANA.SFTPEDI.GDGROUP1(+1)
ZosUtilÝF¨: -> zos_stat(//SYDIANA.SFTPEDI.GDGROUP1(+1))
ZosDatasetÝF¨: -> path2dsn(//SYDIANA.SFTPEDI.GDGROUP1(+1))
ZosUtilÝF¨: -> zos_formatpath("SYDIANA.SFTPEDI.GDGROUP1(+1)", 0)
ZosUtilÝF¨: <- zos_formatpath("SYDIANA.SFTPEDI.GDGROUP1(+1)")
ZosDatasetÝF¨: <- path2dsn("SYDIANA.SFTPEDI.GDGROUP1(+1)", useLevels=1)
ZosUtilÝF¨: -> DirEntCache::find("SYDIANA.SFTPEDI.GDGROUP1(+1)")
ZosUtilÝF¨: <- DirEntCache::find()
ZosDatasetÝF¨: -> path2PdsOrGds(//SYDIANA.SFTPEDI.GDGROUP1(+1))
ZosDatasetÝF¨: -> path2dsn(//SYDIANA.SFTPEDI.GDGROUP1)
ZosUtilÝF¨: -> zos_formatpath("SYDIANA.SFTPEDI.GDGROUP1", 0)
ZosUtilÝF¨: <- zos_formatpath("SYDIANA.SFTPEDI.GDGROUP1")
ZosDatasetÝF¨: <- path2dsn("SYDIANA.SFTPEDI.GDGROUP1", useLevels=1)
CatalogSearchÝF¨: -> DatasetInfo::getDatasetInfo(SYDIANA.SFTPEDI.GDGROUP1)
CatalogSearchÝF¨: -> CatalogSearch()
CatalogSearchÝD¨: filterKey="SYDIANA.SFTPEDI.GDGROUP1"
CatalogSearchÝF¨: <- CatalogSearch(wa_size=1024)
CatalogSearchÝT¨: -> search()
CatalogSearchÝT¨: search: total_length=1024, min_required=0, used=168, num_fields_plus_one=3, resume=
CatalogSearchÝT¨: <- search()
CatalogSearchÝF¨: -> getDatasetInfo()
CatalogSearchÝF¨: entry name="SYDIANA.SFTPEDI.GDGROUP1"
CatalogSearchÝF¨: <- getDatasetInfo()
CatalogSearchÝF¨: -> ~CatalogSearch()
CatalogSearchÝF¨: <- ~CatalogSearch()
CatalogSearchÝF¨: <- DatasetInfo::getDatasetInfo()
ZosDatasetÝF¨: <- path2PdsOrGds(true, dsn=SYDIANA.SFTPEDI.GDGROUP1 memname=+1 isGds=true)
ZosUtilÝF¨: <- zos_stat(rc=0 0x030001b6 "")
Ý04.477¨ Multiple files match, but "//SYDIANA.SFTPEDI.GDGROUP1(+1)" is not a directory
ZosUtilÝD¨: SSH process times: elapsed=11 secs, user cpu=0.160000 secs, sys cpu=0.050000 secs
ZosUtilÝF¨: -> DirEntCache::clear()
ZosUtilÝF¨: <- DirEntCache::clear()
CoZBatchÝI¨: returning rc=exitcode=1

please advise.

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

Re: Get multiple files using a wild-card pattern to a GDG

Postby dovetail » Mon Mar 20, 2017 12:57 pm

Wildcard downloading to a GDG is not supported before release 2.4.0.

See "Example: Get multiple files using a wild-card pattern to a GDG" here:
https://dovetail.com/docs/sftp/client.h ... t-ds_trans


Return to “COZBATCH”

Who is online

Users browsing this forum: No registered users and 1 guest