Thursday 2 May 2019

How to check the limit of GDG file

Goto 3.4 and type in the GDG name. Press Enter.
Then where u give B for Browse , E for Edit

type in LISTCAT ENT(/) ALL and press ENTER.

Or

The ISPF Dataset Utility (=3.2) can generate the LISTCAT command for you and then execute it.

Take option 3.2
Enter the name of the GDG base and take option V (VSAM Utilities).
Under "Process Request" take option 3. Under "Data Type" you can leave it blank or take option 4 and hit enter.
On the next screen make sure there is a (/) slash next to "Edit IDCAMS command". Under "Name, History, Volume, ALLOcation, All" put ALL and hit enter.
This will generate a LISTCAT command essentially the same as used above:
/* IDCAMS COMMAND */
LISTCAT ENTRIES(ZZJR001.TEMP.GDG) -
GENERATIONDATAGROUP -


Then enter the EXEC command to execute it.

Or

Go to command prompt and type 
TSO LISTC ENT('GDG-BASE-NAME') ALL

Alter GDG file

The maximum limit of a GDG file is 255 generations.

Say, you have created a GDG base with the limit of 50 generations and later you want to increase its limit to maximum (255 generations), then you need to Alter GDG base like below.

//STEP01 EXEC PGM=IDCAMS      
//SYSPRINT DD SYSOUT=*        
//SYSIN    DD *               
  ALTER GDG.BASE.NAME LIMIT(255)
/*

Once the above job is successful, the limit of GDG file GDG.BASE.NAME will be increased from 50 to 255.