View previous topic :: View next topic
|
Author |
Message |
JAYANT KUMAR SAHOO
New User
Joined: 15 Mar 2006 Posts: 14
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
Back to top |
|
|
JAYANT KUMAR SAHOO
New User
Joined: 15 Mar 2006 Posts: 14
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Again - Using LMDLIST & LMERASE.
O. |
|
Back to top |
|
|
raghunathns
Active User
Joined: 08 Dec 2005 Posts: 127 Location: rochester
|
|
|
|
DELETE userid.TEST.GDG GENERATIONDATAGROUP FORCE PURGE
deletes all generations and base also. |
|
Back to top |
|
|
akshaiya
New User
Joined: 17 Sep 2005 Posts: 49
|
|
|
|
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 |
|
|
Avinash_Gupta
New User
Joined: 11 May 2005 Posts: 26 Location: Hyderabad
|
|
|
|
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 |
|
|
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
have you tried
DEL PT.TEST.D040411.* |
|
Back to top |
|
|
Avinash_Gupta
New User
Joined: 11 May 2005 Posts: 26 Location: Hyderabad
|
|
|
|
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 |
|
|
JAYANT KUMAR SAHOO
New User
Joined: 15 Mar 2006 Posts: 14
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
JAYANT KUMAR SAHOO
New User
Joined: 15 Mar 2006 Posts: 14
|
|
|
|
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 |
|
|
|