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

how to delete a no of datasets with same higher qualifier??


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
JAYANT KUMAR SAHOO

New User


Joined: 15 Mar 2006
Posts: 14

PostPosted: Sat Aug 26, 2006 3:15 am
Reply with quote

Hi I am trying to delete some of the(plenty no of) datasets with same higher qualifier .How can I do it efficiently with some rexx code or any other method apart form manually deleting the datastes one by one.

Like suppose there are some 1000 datasets are there under F4567AA.Test.*

Then how can I delete the datasets in most efficient way?
Any help would be really appreciated.

Regards,
Jayant.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Aug 26, 2006 5:51 am
Reply with quote

I'd use ADRDSSU, as shown here in this previous post.

In REXX, I'd use a TSO session and just loop through the list of datasets with a TSO DELETE command.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Aug 27, 2006 12:40 am
Reply with quote

Or you can use the ISPF services LMDLIST & LMERASE.

O.
Back to top
View user's profile Send private message
JAYANT KUMAR SAHOO

New User


Joined: 15 Mar 2006
Posts: 14

PostPosted: Mon Aug 28, 2006 9:19 pm
Reply with quote

I got the result .But if its a set of GDGs then how to delete that.
Coz the IDCAM job cannot delete the base GDG before deleting all the generations.
How to delete all of them in a single shot??

Jay.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Aug 28, 2006 9:40 pm
Reply with quote

Again - Using LMDLIST & LMERASE.

O.
Back to top
View user's profile Send private message
raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Wed Aug 30, 2006 1:18 am
Reply with quote

DELETE userid.TEST.GDG GENERATIONDATAGROUP FORCE PURGE

deletes all generations and base also.
Back to top
View user's profile Send private message
akshaiya

New User


Joined: 17 Sep 2005
Posts: 49

PostPosted: Wed Aug 30, 2006 11:38 am
Reply with quote

Delete is fine.
But is there a possibility to copy a dataset to 100 different datasets using such syntax...Is there any other simple way rather than coding it 100 times?
Back to top
View user's profile Send private message
Avinash_Gupta

New User


Joined: 11 May 2005
Posts: 26
Location: Hyderabad

PostPosted: Tue Sep 05, 2006 6:14 pm
Reply with quote

Hi,
I have the following list of datasets:
PT.TEST.D040411.T015933
PT.TEST.D040412.T042355
PT.TEST.D040413.T020404
PT.TEST.D040414.T020454
PT.TEST.D040415.T021052
There are more than 1000 such datasets whose first two qualifiers are same but the dates and times are varying (as you can see above)
Both the utilites are not working as i can only give DELETE PT.TEST.* but still the last two qualifiers are not addressed as date and time are changing.

Please let me know a efficient way in which i can delete these bulk datasets at one shot.
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Tue Sep 05, 2006 8:07 pm
Reply with quote

have you tried
DEL PT.TEST.D040411.*
Back to top
View user's profile Send private message
Avinash_Gupta

New User


Joined: 11 May 2005
Posts: 26
Location: Hyderabad

PostPosted: Wed Sep 06, 2006 9:06 am
Reply with quote

Actually the above will only delete a single dataset.the date D0411 is changing to another date D0412.it will not help me in bulk delete.
Back to top
View user's profile Send private message
JAYANT KUMAR SAHOO

New User


Joined: 15 Mar 2006
Posts: 14

PostPosted: Thu Sep 07, 2006 1:04 am
Reply with quote

Similar requirement.
I have a bunch of datasets with
F1234U.TEST.USEROUT* WHERE * FROM - 1 TO N
How will I rename all the datasets to
F1234.AA.TEST.USEROUT*

Any suggestion how this can be achieved through batch instead of changing them manually for each one in ISPF .

Any help will be appreciated.


Jay.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Sep 07, 2006 1:31 am
Reply with quote

Anyone of the commands TSO RENAME, TSO ALTER, or IDCAMS ALTER can be batched to do whatever you want. Why would you even be considering doing this manually?

For the rest of you, the same applies to the TSO DELETE or IDCAMS DELETE commands. Just batch them up for a given list of dataset names and let 'em rip!
Back to top
View user's profile Send private message
JAYANT KUMAR SAHOO

New User


Joined: 15 Mar 2006
Posts: 14

PostPosted: Thu Sep 07, 2006 2:17 am
Reply with quote

Abinash,

whenever u want to bulk delete u have to mention upto the last but one qualifier and then put the .*(dot star).

Then only u can achieve the goal.for ur requirement U have to bring all ur datastes to a sync so that they will only differ only in the last qulaifier.Then use the usual IDCAMS delete in batch or use a TSo delete in REXX code for the entire list. U will achieve ur goal.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top