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

Job to delete GDG's


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Minu Mary Raju

New User


Joined: 20 Nov 2007
Posts: 5
Location: Chennai

PostPosted: Wed Feb 20, 2008 5:14 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Feb 20, 2008 5:19 pm
Reply with quote

You need IDCAMs to delete the base, simple deletes will not delete the base....
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Feb 20, 2008 5:20 pm
Reply with quote

If you use the GDG base name in IEFBR14 then the generations get deleted but the base remains
Back to top
View user's profile Send private message
Minu Mary Raju

New User


Joined: 20 Nov 2007
Posts: 5
Location: Chennai

PostPosted: Wed Feb 20, 2008 5:25 pm
Reply with 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.
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Wed Feb 20, 2008 6:30 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Feb 20, 2008 10:10 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Feb 20, 2008 11:37 pm
Reply with quote

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
View user's profile Send private message
rajeshrs488

New User


Joined: 21 Feb 2008
Posts: 3
Location: Banglore

PostPosted: Mon Feb 25, 2008 12:03 pm
Reply with quote

//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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Feb 25, 2008 3:21 pm
Reply with quote

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
View user's profile Send private message
zawx

New User


Joined: 28 Feb 2008
Posts: 21
Location: china

PostPosted: Mon Mar 17, 2008 11:26 am
Reply with quote

//STEP1 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TSOAP11.DATA.TEMP.GDG1 GDG PURGE
/*
Back to top
View user's profile Send private message
zawx

New User


Joined: 28 Feb 2008
Posts: 21
Location: china

PostPosted: Mon Mar 17, 2008 11:28 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Mar 17, 2008 1:06 pm
Reply with quote

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.. icon_wink.gif
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 Delete file row if blanks in the firs... DFSORT/ICETOOL 5
No new posts volume mass delete RMM JCL & VSAM 2
No new posts Easy way to delete selected members f... IBM Tools 12
No new posts Need to delete inactive records from ... DB2 5
No new posts Unable to delete dataset - VSAM datas... JCL & VSAM 20
Search our Forums:

Back to Top