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

How to validate the currect generation of GDG reached max no


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
palas_08
Currently Banned

New User


Joined: 26 Feb 2007
Posts: 9
Location: kolkatta

PostPosted: Fri Aug 03, 2007 3:13 pm
Reply with quote

hi,

GDG name : xx1.xap.temp.tran

Limit : 5

How to validate the currect generation of GDG reached max no
i.e. current generattion of GDG is the 5 th generation ?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Aug 03, 2007 3:26 pm
Reply with quote

Palas,

If the # of existing generations are 5 or more.......
Back to top
View user's profile Send private message
palas_08
Currently Banned

New User


Joined: 26 Feb 2007
Posts: 9
Location: kolkatta

PostPosted: Fri Aug 03, 2007 3:44 pm
Reply with quote

hi,

limit can be max 255.

Generally we are giving limit when we are creating gdg.

I want to say that limit.

----------------------------------------------------------------------------------
Regards
Palas
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Fri Aug 03, 2007 4:06 pm
Reply with quote

If LIMIT=5 means, the maximum available generations in catalog are -4, -3, -2, -1 and 0.

Run a JSCAN(JOB SCAN) batch job to check that whether -4 is cataloged or not for the JCL code as the following one.

Code:
// EXEC PGM=IEFBR14                         
//DD1 DD DSN=GDG.FILE(-4),DISP=OLD 


If the return code is 0, it means that the LIMIT=5 was reached.
If the return code is 8, it means that the LIMIT=5 was not reached.
Back to top
View user's profile Send private message
palas_08
Currently Banned

New User


Joined: 26 Feb 2007
Posts: 9
Location: kolkatta

PostPosted: Fri Aug 03, 2007 4:24 pm
Reply with quote

hi,

max limit can be variable .
max limit can be 5,6,7 ,8
that u don't know properly .

Regards
palas
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Fri Aug 03, 2007 7:07 pm
Reply with quote

If LIMIT=N means, the maximum available generations in catalog are -(N-1), -(N-2), -(N-3), -(N-4), . . . . . . . -4, -3, -2, -1 and 0.

Run a JSCAN(JOB SCAN) batch job to check that whether -(N-1) is cataloged or not for the JCL code generated by the following one.



Code:
// EXEC PGM=IDCAMS                                                     
//SYSPRINT DD DSN=&&LISTCAT,DISP=(,PASS)                               
//SYSIN DD *                                                           
 LISTCAT ENTRIES(XXXXX.XXXXXXX.GDG) ALL                                 
/*                                                                     
//*                                                                     
// EXEC PGM=SORT                                                       
//SORTIN DD DSN=&&LISTCAT,DISP=(OLD,PASS)                               
//SORTOUT DD DSN=XXXXX.XXXXXXX.MAXLIMIT,DISP=(,CATLG),RECFM=F,LRECL=80,
// BLKSIZE=0,SPACE=(CYL,1)                                             
//SYSOUT DD SYSOUT=*                                                   
//SYSIN DD *                                                           
 OPTION SKIPREC=9,STOPAFT=1                                             
 INREC FIELDS=(1,4,34,3)                                               
 SORT FIELDS=COPY                                                       
 ALTSEQ CODE=(60F0)                                                     
 OUTREC FIELDS=(1,4,5,3,TRAN=ALTSEQ)                                   
 OUTFIL OUTREC=(C'//XXXXXXXA JOB ,,NOTIFY=&SYSUID,MSGCLASS=H',38X,/, 
 C'// EXEC PGM=IEFBR14',61X,/,                                       
 C'//DD1 DD DSN=XXXXX.XXXXXXX.GDG(-',5,3,ZD,SUB,+1,M11,LENGTH=3,     
 C'),DISP=OLD',33X),                                                 
 VTOF,REMOVECC                                                       
/*                                                                   
//*           
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Fri Aug 03, 2007 7:28 pm
Reply with quote

Hi Palas,

If i understood u correctly

we dont have any way to (as per my knoweldge) to find out that it has reached to it limit and now its will revolve back to generation zero.

This scnarion becomes more complex when we already have 5 version and our job creates new one so it drops the oldest generation. So if we need to keep more version or more backups we copy the current GDG into date qualified files.

Correct me if i lack somthing
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Aug 03, 2007 7:46 pm
Reply with quote

Hello,

It is not the design of GDG processing to reach the limit and start over.

As new +1 versions are created, the generation increases. When the limit is reached, the early generations are "rolled off", retaining the most current "limit" generations. It is very likely that as processing continues, the generations in the catalog will be far from the 1st-5th generations. Even though the generations increase, they are still processed using (0), (-1), etc up to (-4).
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 VB to VB copy - Full length reached SYNCSORT 8
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts Report generation JCL & VSAM 18
No new posts How can I get Generation Nbr of GDG f... IBM Tools 1
Search our Forums:

Back to Top