IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

GDG all in sequence order


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Fri Dec 24, 2021 10:31 pm
Reply with quote

In JCL,

// DD DISP=SHR,DSN=gdgbase

will allocate data sets in order newest, next,..., oldest

I believe it is possible to have it allocate oldest,... newest order, but I couldn't quickly find out how to do it.

Help!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Dec 25, 2021 1:42 am
Reply with quote

it should be something along the lines of

Code:
...
//ddname DD DSN=<the gdg.base.name>,DISP=SHR,GDGORDER=FIFO
...
//ddname DD DSN=<the gdg.base.name>,DISP=SHR,GDGORDER=LIFO
...


the silly google search I used

Quote:
allocating a gdg in reverse order

and the first hit was the link to the manual
www.ibm.com/docs/en/zos/2.3.0?topic=set-retrieving-all-generation-data-sets
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Dec 25, 2021 1:43 am
Reply with quote

hit the mouse button a couple times more than needed
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Sat Dec 25, 2021 8:56 pm
Reply with quote

Thank you Enrico.

I think I looked everywhere in the JCL Reference manual except the DD statement section. For some reason I thought it was a JOB statement parameter. Actually, now that I think about it, GDGORDER on the DD statement makes a lot more sense than a JOB statement parameter where you already have that GDGBIAS parameter to confuse thing even more.

I have to admit I'm really bad about silly Google search parameters.

Merry Christmas.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Sun Dec 26, 2021 2:55 pm
Reply with quote

@Steve: If you want to have it permanently w/o altering the JCL, please see IDCAMS ALTER <gdg_base> LIFO|FIFO command.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Sun Dec 26, 2021 9:28 pm
Reply with quote

Yes, I noticed that in the IDCAMS manual. It raises the question what happens when you combine them: FIFO defined for the index, and GDGORDER=LIFO. What happens when you ALTER FIFO a populated index created LIFO? I should go back to the IDCAMS manual and see if it says anything. I've mostly been working on other things; mostly interpreting IGGCSI00 output. The GDGORDER came up when I built a GDG index to investigate CSI00 output and then I thought about reordering.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Mon Dec 27, 2021 9:48 am
Reply with quote

I don’t remember but cbttapes have something for this , try GDGCOPY. When I searched it’s file482 not sure if that would do the trick.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Mon Dec 27, 2021 3:57 pm
Reply with quote

steve-myers wrote:
Yes, I noticed that in the IDCAMS manual. It raises the question what happens when you combine them: FIFO defined for the index, and GDGORDER=LIFO. What happens when you ALTER FIFO a populated index created LIFO? I should go back to the IDCAMS manual and see if it says anything. I've mostly been working on other things; mostly interpreting IGGCSI00 output. The GDGORDER came up when I built a GDG index to investigate CSI00 output and then I thought about reordering.

From my experience, the JCL GDGORDER always overrides the Catalog. FIFO basically makes the most sense with SMF-Data and alikes.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Dec 30, 2021 5:06 am
Reply with quote

Joerg.Findeisen wrote:
steve-myers wrote:
Yes, I noticed that in the IDCAMS manual. It raises the question what happens when you combine them: FIFO defined for the index, and GDGORDER=LIFO. What happens when you ALTER FIFO a populated index created LIFO? I should go back to the IDCAMS manual and see if it says anything. I've mostly been working on other things; mostly interpreting IGGCSI00 output. The GDGORDER came up when I built a GDG index to investigate CSI00 output and then I thought about reordering.

From my experience, the JCL GDGORDER always overrides the Catalog. FIFO basically makes the most sense with SMF-Data and alikes.
I prefer the JCL GDGORDER as it makes it clear that the traditional default is not being used.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Thu Dec 30, 2021 11:44 am
Reply with quote

don.leahy wrote:
I prefer the JCL GDGORDER as it makes it clear that the traditional default is not being used.

For SMF-Data our shop has altered all GDG Base entries. That was quicker than mass updates of JCLs on every LPAR. But yes, I see your point for "not so obvious" entries. icon_cool.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Rotate partition-logical & physic... DB2 0
No new posts Cobol program with sequence number ra... COBOL Programming 5
No new posts DB2 Load - Sort Or order BY DB2 1
No new posts Find missing sequence for every key DFSORT/ICETOOL 3
No new posts Sequence number generation for multip... DFSORT/ICETOOL 2
Search our Forums:

Back to Top