Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Job to delete GDG's

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Job to delete GDG's
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: 2150
Location: At my coffee table

PostPosted: Wed Feb 20, 2008 5:19 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Feb 20, 2008 5:20 pm    Post subject:
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    Post subject: Re: Job to dlete GDG versions
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: 1439
Location: Bangalore,India

PostPosted: Wed Feb 20, 2008 6:30 pm    Post subject:
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

Site Director


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

PostPosted: Wed Feb 20, 2008 10:10 pm    Post subject:
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

Senior Member


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

PostPosted: Wed Feb 20, 2008 11:37 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Feb 25, 2008 3:21 pm    Post subject:
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Mon Mar 17, 2008 1:06 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Delete record or Reset RC code using ... mpawan Compuware & Other Tools 4 Tue Jul 26, 2016 3:52 pm
No new posts Delete VSAM File Records amitc23 CICS 6 Sun Apr 10, 2016 10:10 am
No new posts DB2 Stored Procedure - Dynamic SQL - ... GuyC DB2 2 Wed Feb 17, 2016 5:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us