MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delete multiple GDG bases

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
gildan2020
Beginner


Joined: 07 Dec 2006
Posts: 17
Topics: 8

PostPosted: Fri Jun 06, 2008 9:37 am    Post subject: Delete multiple GDG bases Reply with quote

Hi,

I am writing a JCL to delete GDG bases.

I know the command is as follows:
Code:
Delete DSN.GDG      GDG PURGE FORCE

But that works for only one GDG base entry, how do I delete multiple GDG base entries having the same name, ie DSN.**?

I tried to use a pattern like DSN.** but it didn't work. Pls help.
Back to top
View user's profile Send private message
Ram
Beginner


Joined: 12 Jan 2004
Posts: 53
Topics: 12

PostPosted: Fri Jun 06, 2008 9:55 am    Post subject: Reply with quote

gildan2020,

Try searching for a post that shows the creation date of all the GDG versions in this forum. Had seen one a couple of years back.

Here is the idea.

Step 1 : Do a LISTCAT to get a list of all files matching your search criteria.
Step 2 : Use Icetool or sort to extract GDG bases from the o/p of first step.
Step 3 : Use IDCAMS to delete all the GDG bases by using the o/p of step 2.

Gurus' correct me if I am wrong.

Thanks,
Ram
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Jun 06, 2008 10:17 am    Post subject: Reply with quote

gildan2020,

use ADRDSSU to delete the GDG entries. Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?p=19004#19004
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ram
Beginner


Joined: 12 Jan 2004
Posts: 53
Topics: 12

PostPosted: Fri Jun 06, 2008 10:41 am    Post subject: Reply with quote

Kolusu's method is the easiest. Just posting the JCL to my earlier reply.

Code:
//STEP01   EXEC PGM=IKJEFT01                               
//SYSTSPRT DD DSN=&L,                                     
//            DISP=(,PASS),                               
//            SPACE=(CYL,(1,1),RLSE),                     
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)           
//SYSTSIN  DD *                                           
  LISTCAT ENT('HLQ.MLQ.*') ALL                       
//*                                                       
//STEP02   EXEC PGM=ICETOOL                               
//TOOLMSG  DD SYSOUT=*                                     
//DFSMSG   DD SYSOUT=*                                     
//IN       DD DSN=&L,DISP=(OLD,PASS)                       
//T1       DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(5,5),RLSE) 
//TOOLIN   DD *                                           
   COPY FROM(IN)  USING(CTL1)                             
//CTL1CNTL DD *                             
  OUTFIL FNAMES=T1,                         
  INCLUDE=(1,8,CH,EQ,C'GDG BASE'),         
  OUTREC=(2:C'DELETE ',17,44,C' PURGE',22X)
/*                                         
//STEP3 EXEC PGM=IDCAMS                     
//SYSPRINT DD SYSOUT=*                     
//SYSIN DD DSN=&T1,DISP=(OLD,PASS)         


Thanks,
Ram
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Fri Jun 06, 2008 11:08 am    Post subject: Reply with quote

kolusu,

We don't use DFDSS in our shop but I'm wondering if the DUMP operation goes thru the work fo reading all the files even though the OUTDD is dummied?

If so, the method proposed by ram would be preferred.
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Jun 06, 2008 11:24 am    Post subject: Reply with quote

Bill Dennis,

Bill,

I don't think DFDSS reads the datasets when the output is DUMMY. The documentation for ADRDSSU says

Quote:

NOTE: If the output file for a DUMp is specified as DUMMY in the JCL, DFDSS can be used to scratch and uncatalog data sets by specifying the DELETE parameter.


DFDSS does not delete migrated Datasets.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Sat Jun 07, 2008 4:27 am    Post subject: Reply with quote

IGGCSIRX in SYS1.SAMPLIB can be tailored to do many things.

I did write a version at a previous shop that would delete all the GDG entries and bases in one hit using wild card selection.

Alas, I never thought I'd need it again and didn't keep a copy of the source bonk
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group