Get GDG versions in a file.

Other Mainframe related questions which attracts you and there is no suitable Forum you find for it and related FAQs.
Post Reply
Anushka Sharma
Registered Member
Posts: 34
Joined: Sun Sep 01, 2013 4:56 pm
India

Get GDG versions in a file.

Post 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?
User avatar
zum13
Active Member
Posts: 127
Joined: Thu May 04, 2023 12:58 am

Re: Get GDG versions in a file.

Post 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
User avatar
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 843
Joined: Wed Sep 11, 2013 3:57 pm

Re: Get GDG versions in a file.

Post by enrico-sorichetti »

the TS does NOT want to process all the generations
he wants  to pull all the generations names into a file
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
zum13
Active Member
Posts: 127
Joined: Thu May 04, 2023 12:58 am

Re: Get GDG versions in a file.

Post 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)
?
User avatar
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 843
Joined: Wed Sep 11, 2013 3:57 pm

Re: Get GDG versions in a file.

Post by enrico-sorichetti »

yess
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Anushka Sharma
Registered Member
Posts: 34
Joined: Sun Sep 01, 2013 4:56 pm
India

Re: Get GDG versions in a file.

Post 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?
User avatar
zum13
Active Member
Posts: 127
Joined: Thu May 04, 2023 12:58 am

Re: Get GDG versions in a file.

Post 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
Anushka Sharma
Registered Member
Posts: 34
Joined: Sun Sep 01, 2013 4:56 pm
India

Re: Get GDG versions in a file.

Post by Anushka Sharma »

Thank you so much zum13, this is very helpful. 
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Other Mainframe Topics, Off-Topics, FAQs.”