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

Ensure that all generation of a GDG are deleted


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

New User


Joined: 22 Mar 2007
Posts: 57
Location: India

PostPosted: Sat Jan 23, 2010 7:35 pm
Reply with quote

Hi Friends,

I have a requirement wherein I need to ensure that a set of GDG's do not have any generation. So I used the following JCL to delete all the generations of those GDG's,

Code:
//STEP010 EXEC PGM=IEFBR14,COND=(00,NE)
//DELETE01 DD DSN=INPUT.GDG.FILE1,     
//            DISP=(MOD,DELETE,DELETE),
//            UNIT=SYSALLDA,           
//            SPACE=(CYL,0)             

... and similarly many other GDG generations are deleted

But my JCL fails with JCL ERROR in case any of the GDG base do not have a generation.

Can I have any suggestion in this regards...
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Sat Jan 23, 2010 8:26 pm
Reply with quote

Hi,

Please try with IDCAMS step with SYSIN as below.
Code:
DELETE INPUT.GDG.FILE1.* PURGE
IF MAXCC LE 8 THEN SET MAXCC EQ 0
Back to top
View user's profile Send private message
Deepakgoyal2005

New User


Joined: 22 Mar 2007
Posts: 57
Location: India

PostPosted: Sat Jan 23, 2010 8:45 pm
Reply with quote

Hi Gnana,

Thanks for the solution. It worked for me. 2014.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sun Jan 24, 2010 1:09 am
Reply with quote

Hello Gnana Sekaran Nallathambi,
Solution given by you will delete all the dataset with INPUT.GDG.FILE1.*
irrespective of whether it is GDG generation for the base INPUT.GDG.FILE1
For example by this code any PS like INPUT.GDG.FILE1.IMPFILE will also get deleted.

Deepakgoyal2005,
You can create dummy generation in previous step and then use your step for deleting all the generation.


Code:

//STEP0010 EXEC PGM=IEFBR14                                   
//A  DD DSN=gdg.base.name(+1),DISP=(NEW,CATLG,DELETE)     
//STEP0020 EXEC PGM=IEFBR14                                   
//B  DD DSN=gdg.base.name,DISP=(MOD,CATLG,DELETE)         
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: Sun Jan 24, 2010 3:18 am
Reply with quote

Hello,

Code:
//STEP0010 EXEC PGM=IEFBR14                                   
//A  DD DSN=gdg.base.name(+1),DISP=(NEW,CATLG,DELETE)     
//STEP0020 EXEC PGM=IEFBR14                                   
//B  DD DSN=gdg.base.name,DISP=(MOD,CATLG,DELETE)


Please test this "solution". . . It will not do what Depak requested. . .

Unless there is somethng i am mikssing. . .
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sun Jan 24, 2010 3:47 am
Reply with quote

Opps.. I am really sleepy...
should have been....

Code:

//STEP0010 EXEC PGM=IEFBR14                                   
//A  DD DSN=gdg.base.name(+1),DISP=(NEW,CATLG,DELETE)     
//STEP0020 EXEC PGM=IEFBR14                                   
//B  DD DSN=gdg.base.name,DISP=(MOD,DELETE,DELETE)         
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: Sun Jan 24, 2010 5:12 am
Reply with quote

dick scherrer wrote:
mikssing. . .
What language should I be setting my browser to?.....chuckle.....
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: Sun Jan 24, 2010 5:46 am
Reply with quote

Hah - There you are. . . icon_exclaim.gif

Quote:
What language should I be setting my browser to?.....chuckle.....
Keylexic? Or more accurately - the key double-tap setting . . . Digital dexterity has left the building. . .

Good to see you this year icon_wink.gif

d
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: Sun Jan 24, 2010 7:15 am
Reply with quote

dick scherrer wrote:
Good to see you this year icon_wink.gif
Good to be back...grin...
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 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
No new posts Sequence number generation for multip... DFSORT/ICETOOL 2
Search our Forums:

Back to Top