View previous topic :: View next topic
|
Author |
Message |
Minu Mary Raju
New User
Joined: 20 Nov 2007 Posts: 5 Location: Chennai
|
|
|
|
How do I delete the generations of a GDG without deleting the base. Could anyone please help me to solve this issue by providing a sample job?
Regards,
Minu. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
You need IDCAMs to delete the base, simple deletes will not delete the base.... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
If you use the GDG base name in IEFBR14 then the generations get deleted but the base remains |
|
Back to top |
|
|
Minu Mary Raju
New User
Joined: 20 Nov 2007 Posts: 5 Location: Chennai
|
|
|
|
This has to be executed as a daily job which will delete the previous day's file for the following night's batch run. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Minu,
Deletion of gens had been already answered by 'cics guy' and expat.
Quote: |
This has to be executed as a daily job which will delete the previous day's file for the following night's batch run. |
Just wanted to know, what kind of data does your gens have. I really dint get why have created a gdg for holding one gen at any point of time? You could have gone for simple flat file instead. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
This has to be executed as a daily job which will delete the previous day's file |
One of the main reasons (if not the main reason) for having gdg's is so that some number of previous files will be available.
Is there some reason to delete "yesterday's" file rather than simply letting it "roll off" naturally? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Quote: |
This has to be executed as a daily job which will delete the previous day's file |
Hi,
If above is the requirement, why don't use a QSAM file with default DISP parametes... |
|
Back to top |
|
|
rajeshrs488
New User
Joined: 21 Feb 2008 Posts: 3 Location: Banglore
|
|
|
|
//MYJOB JOB (ER456),'RAMESH'
//STEP1 EXEC PGM=IEFBR14
//DEL1 DD DSN=MYLIB.LIB.TEST(0) <-- Current Version
// DISP=(OLD,DELETE,DELETE)
//
this code will help u for deletion of gdg,with out deleting the base |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
rajeshrs488 wrote: |
//MYJOB JOB (ER456),'RAMESH'
//STEP1 EXEC PGM=IEFBR14
//DEL1 DD DSN=MYLIB.LIB.TEST(0) <-- Current Version
// DISP=(OLD,DELETE,DELETE)
//
this code will help u for deletion of gdg,with out deleting the base |
Yes, but only the (0) generation though. |
|
Back to top |
|
|
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
//STEP1 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TSOAP11.DATA.TEMP.GDG1 GDG PURGE
/* |
|
Back to top |
|
|
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
The job can delete all generations.
//STEP1 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE YOURTOSNAME.DATA.GDG1.*
/* |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hold down hold down guys, let 'Minu Mary Raju' come back to confirm what has been asked in earlier posts.
P.S.: 'Minu Mary Raju' ..a single person is logged in or.. |
|
Back to top |
|
|
|