Which generation is read first if GDG base is input?

All sort of Mainframes Interview Questions.
Post Reply
Abhishek Mehta
Registered Member
Posts: 15
Joined: Fri Dec 26, 2014 2:34 pm

Which generation is read first if GDG base is input?

Post by Abhishek Mehta »

Hi,

Yesterday I had an interview, the question was the newer version of a GDG gets placed where, I said bottom. But interviewer was not happy.

When I discussed this with my friends, one suggested that, "Possibly, it was not for locating them in ISPF 3.4. It was possibly to do with what if GDG Base is given as input to a program then newer version of a GDG gets placed where... in that chronological order."

So, which generation is read first if GDG base is input?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1896
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Which generation is read first if GDG base is input?

Post by Robert Sample »

Actually, the read order has depended upon the GDGORDER JCL parameter at least since 2017 (z/OS 2.1 approximately). The default order is GDGORDER=LIFO (last in, first out) so the generations will be read in descending generation order (that is, the latest created generation will be read first). With GDGORDER=FIFO, the generations will be read by age (oldest first).
the newer version of a GDG gets placed where
This statement is so vague as to be meaningless. "place where" could be where the GDG is cataloged, or where the data set is stored, or ... When a new generation is created, the generation number will ALWAYS be one higher than the previous generation (unless that generation was 9999 in which case the new generation number will be 0001).
Abhishek Mehta
Registered Member
Posts: 15
Joined: Fri Dec 26, 2014 2:34 pm

Re: Which generation is read first if GDG base is input?

Post by Abhishek Mehta »

Thanks Robert.

Question is vague actually and I could not answer well. GDGORDER is a new concept, thanks for sharing it.
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 “Interview Questions.”