Page 1 of 1

Wilcards in LISTCAT command using IDCAMS

PostPosted: Wed Jul 30, 2014 1:03 pm
by nasrahdus
Hi all,

I am using the following JCL to find a list of GDG bases and their properties

//STEP     EXEC PGM=IDCAMS   
//SYSIN    DD *             
 LISTCAT ENTRIES(abc.x.*)  GDG ALL
//SYSPRINT DD SYSOUT=*       
//*                         


This displays only gdgs with 3 qualifiers, eg. abc.x.abc, abc.x.acdbg

But I could find GDG bases with upto 5 qualifiers in my DASD and also the 3rd and 4th qualfiers are varied,and so am not able to group.

Is there way to display the list of bases with qualifiers 4 and more. Tried abc.x.**, abc.x.%, abc.x.- and all of these seems invalid. Some help would be appreciated. Thanks in adavance

Re: Wilcards in LISTCAT command using IDCAMS

PostPosted: Wed Jul 30, 2014 2:53 pm
by BillyBoyo
http://pic.dhe.ibm.com/infocenter/zos/v ... amsr11.htm

I can't check it at the moment, as it is not currently working, but I assume that is temporary.

Re: Wilcards in LISTCAT command using IDCAMS

PostPosted: Wed Jul 30, 2014 4:35 pm
by nasrahdus
It isn't working as of now.. Have bookmarked it.. Will check and let you know ..Thanks for your time :)

Re: Wilcards in LISTCAT command using IDCAMS

PostPosted: Thu Jul 31, 2014 6:38 am
by Robert Sample
Have you tried
//STEP     EXEC PGM=IDCAMS   
//SYSIN    DD *             
 LISTCAT LEVELS(abc.x)  GDG ALL
//SYSPRINT DD SYSOUT=*       
//*

Re: Wilcards in LISTCAT command using IDCAMS

PostPosted: Thu Jul 31, 2014 5:13 pm
by nasrahdus
Yep.. Have tried it.. It doesn't do an extensive search.. It just searches for the dataset name mentioned inside the braces

Re: Wilcards in LISTCAT command using IDCAMS

PostPosted: Fri Aug 01, 2014 7:34 am
by Robert Sample
Odd -- LEVEL (as opposed to ENTRIES as you posted) is supposed to do extended search. When I get a chance, I'll do more checking.

Re: Wilcards in LISTCAT command using IDCAMS

PostPosted: Fri Aug 01, 2014 9:33 am
by nasrahdus
Ooopsy...My bad.. It works awesome Robert :) Thanks a lot.. The qualifier I gave the previous day actually didn't have any datasets in DASD and so wrongly inferred the results... :facepalm: