Page 1 of 1

Get GDG versions in a file.

Posted: Sun Nov 10, 2024 11:20 am
by Anushka Sharma
hi all,
i am expecting to pull all gdg versions in a file using the gdg base names, can anyone help me same?

Re: Get GDG versions in a file.

Posted: Mon Nov 11, 2024 4:41 am
by zum13
Hello.

You just specify the GDG base name as input without anything in parentheses after it:

Code: Select all

//INPUT    DD DSN=yourid.gdgbase,DISP=SHR

Re: Get GDG versions in a file.

Posted: Mon Nov 11, 2024 3:17 pm
by enrico-sorichetti
the TS does NOT want to process all the generations
he wants  to pull all the generations names into a file

Re: Get GDG versions in a file.

Posted: Mon Nov 11, 2024 5:16 pm
by zum13
enrico-sorichetti wrote: Mon Nov 11, 2024 3:17 pm the TS does NOT want to process all the generations
he wants  to pull all the generations names into a file

 
 
 
As in

Code: Select all

LISTCAT LEVEL(basename)
?

Re: Get GDG versions in a file.

Posted: Mon Nov 11, 2024 6:04 pm
by enrico-sorichetti
yess

Re: Get GDG versions in a file.

Posted: Tue Nov 12, 2024 7:47 pm
by Anushka Sharma
zum13
enrico-sorichettithe TS does NOT want to process all the generations
he wants  to pull all the generations names into a file

 
 
 
As in

Code: Select all

LISTCAT LEVEL(basename)
?
Thank you , this is what I am looking for. Is there a view to remove, the messages LISTCAT produces automatcally?

Re: Get GDG versions in a file.

Posted: Wed Nov 13, 2024 3:28 am
by zum13
DFSORT can do it. Something along these lines should give you just the dataset names:

Code: Select all

//STEP1   EXEC PGM=IDCAMS
//SYSPRINT  DD DSN=&TEMP1,DISP=(NEW,PASS,DELETE),
//             DCB=(LRECL=133,RECFM=VBA),SPACE=(TRK,1)
//SYSIN     DD *
 LISTCAT LEVEL(gdgbase)
//*
//STEP2   EXEC PGM=SORT
//SYSOUT    DD SYSOUT=*
//SORTIN    DD DSN=&TEMP1,DISP=(OLD,DELETE,DELETE)
//SORTOUT   DD SYSOUT=*,DCB=(LRECL=44,RECFM=F)
//SYSIN     DD *
 INCLUDE COND=(6,7,CH,EQ,C'NONVSAM')
 OUTFIL OUTREC=(22,44),VTOF
 SORT FIELDS=COPY

Re: Get GDG versions in a file.

Posted: Mon Nov 18, 2024 1:34 pm
by Anushka Sharma
Thank you so much zum13, this is very helpful.