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
 

 

Ensure that all generation of a GDG are deleted

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Ensure that all generation of a GDG are deleted
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: 788
Location: Chennai, India

PostPosted: Sat Jan 23, 2010 8:26 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Ensure that all generation of a GDG are deleted
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

Site Director


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

PostPosted: Sun Jan 24, 2010 3:18 am    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Sun Jan 24, 2010 5:12 am    Post subject:
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

Site Director


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

PostPosted: Sun Jan 24, 2010 5:46 am    Post subject: Reply to: Ensure that all generation of a GDG are deleted
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: 2150
Location: At my coffee table

PostPosted: Sun Jan 24, 2010 7:15 am    Post subject: Re: Reply to: Ensure that all generation of a GDG are delete
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    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 SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts alphanumeric sequence generation sivaprasad.gadhi COBOL Programming 6 Wed Mar 30, 2016 3:03 am
No new posts alphanumeric sequence generation sivaprasad.gadhi DFSORT/ICETOOL 8 Mon Mar 21, 2016 1:09 am
No new posts Count the number of rows updated or d... Chetan Kumar DB2 6 Tue Jul 14, 2015 7:57 pm


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