Aion

 View Only
Expand all | Collapse all

GDG oldest Version

  • 1.  GDG oldest Version

    Posted Oct 20, 2009 01:59 AM
    Hi, can any one tell me how to use the oldest version of GDG datatsets in JCL without knowing how many versions are created?


  • 2.  Re: GDG oldest Version

    Posted Oct 21, 2009 05:35 AM
    Sorry - I don't know of a way to do this...here's what I found in the manual (Bolding the critical phrase): Retrieving a Generation Data Set

    z/OS V1R9.0 DFSMS Using Data Sets
    SC26-7410-07 You can retrieve a generation using JCL procedures. Any operation that can be applied to a nongeneration data set can be applied to a generation data set. For example, a generation data set can be updated and reentered in the catalog, or it can be copied, printed, punched, or used in the creation of new generation or nongeneration data sets. You can retrieve a generation data set by using either relative generation numbers or absolute generation and version numbers.  Refer to generation data sets that are in a deferred roll-in state by their relative number, such as (+1), within the job that allocates it. Refer to generation data sets that are in a deferred roll-in state by their absolute generation number (G xxxx V yy ) in subsequent jobs. Scott


  • 3.  Re: GDG oldest Version

    Posted Oct 21, 2009 05:40 AM
    Thank you Scott. I am looking for a way to find out the oldest generation without knowing the numbers of generations created.


  • 4.  Re: GDG oldest Version
    Best Answer

    Posted Oct 21, 2009 11:03 PM
    There's something that looks as though it might be useful here: http://www.mvshelp.net/vbforums/showthread.php?t=24840   (although I'm sure more complicated than you would have wished!)


  • 5.  Re: GDG oldest Version

    Posted Oct 23, 2009 08:27 AM
    Hi there,I went to DFSMS development and here's what I found: "...he can get the oldest version if he knows the LIMIT of the GDG. The LIMIT is specified on DEFINE and printed in a LISTCAT, so this should not be difficult. The newest version using relative notation is the GDG name and (0). For example, suppose we have a GDG named ABC.GDG. Then the current generation is specified in JCL as ABC.GDG(0). The generations prior to that use a minus sign notation. So, the next later generation is specified as ABC.GDG(-1). If you know the LIMIT of the GDG then the oldest version is (LIMIT-1) since the specification is relative to 0. For example, if the GDG LIMIT is 10 in our previous example, then the oldest GDS is ABC.GDG(-9)."  So, you will have to either know the limit or run a listcat to find it before coding LIMIT-1  Scott   


  • 6.  Re: GDG oldest Version

    Posted Oct 24, 2009 01:43 AM
    Additionally, I was reminded by the developers that the earlier solution I wrote about depends on the GDG being full.  If it's not then you would have to find the # of entries - perhaps by calling the CSI, Catalog Search Interface, to query the catalog.  The application program then can code an appropriate negative number to identify that generation when calling dynamic allocation.Scott .


  • 7.  Re: GDG oldest Version

    Posted Oct 24, 2009 01:47 AM
    I think that's what the reference in my previous post would give you - the earliest one in the GDG group regardless of whether it was full or not.


  • 8.  Re: GDG oldest Version

    Posted Oct 26, 2009 03:48 PM
    Thanks for jumping in on this, Scott and Herb, we are lucky to have such experience in our midst! Vijay_P, let us knowi if any of these solutions work out for you.


  • 9.  Re: GDG oldest Version

    Posted Oct 26, 2009 10:20 PM
    Thank you  Scott and Herb. Is there anyway we can call CSI from JCL or manually we need to look at the catalog entries and use the number in JCL?Thanks , Vijay


  • 10.  Re: GDG oldest Version

    Posted Oct 27, 2009 12:21 AM
    Vijay, right at the end of the link I posted (on page 3) there's a reference to something called IGGCSIRX, which comes as part of SYS1.SAMPLIB.  I Googled IGGCSIRX and found this reference, which looks as though it might help: http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.idac100/c1065.htmGood luck!Herb


  • 11.  Re: GDG oldest Version

    Posted Oct 27, 2009 04:36 AM
    Herb's suggestion with the Rexx routine is probably your best bet - otherwise CSI is invoked from programs:http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.idac100/c1065.htm