View previous topic :: View next topic
|
Author |
Message |
anoopn1985
New User
Joined: 23 Apr 2007 Posts: 16 Location: tvm
|
|
|
|
Hi,
I have a requirement to delete thousands of PDS's with name ANOOP.ABC*.*
Could you please help me to get some utility which can be used for this? All the datasets are migrated. I tried to use the utility PGM=ADRDSSU, but this is only for catalogged datasets and not for migrated ones. |
|
Back to top |
|
|
hchinnam
New User
Joined: 18 Oct 2006 Posts: 73
|
|
|
|
You can use a rexx to do it.
Is it is o.k let me know, i will write one which does the JOB. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Found using the search utility on the forum
Click HERE to see a solution which allows all of the * ** and % wildcard characters to search in the DATASETS DD *
Quote: |
Is it is o.k let me know, i will write one which does the JOB. |
Please see the attached link. |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
hI,
Try below one,
Code: |
//HDELET EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
HDELETE 'ANOOP.ABC*.*'
/*
|
Regards
R KARTHIK |
|
Back to top |
|
|
hchinnam
New User
Joined: 18 Oct 2006 Posts: 73
|
|
|
|
Expat,
I tried running the REXX and JCL you provided. My "LINKPGM" to IGGCSI00 returns code "8". Can you tell me some manuals which describes about this pgm. Something like input parameters, return codes etc.. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
THIS is the link to the manual.
You need Appendix C to see the program specification and related information. |
|
Back to top |
|
|
hchinnam
New User
Joined: 18 Oct 2006 Posts: 73
|
|
|
|
Thanks for the manual. |
|
Back to top |
|
|
anoopn1985
New User
Joined: 23 Apr 2007 Posts: 16 Location: tvm
|
|
|
|
Thanks all..
Karthik,
I have tried the option given by you. But its not working and return code is 14.SYSTSPRT message is "NO DSNAMES MATCH ANOOP.ABC*.*
But there are a number of datasets which meets the selection criteria.. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
hchinnam
I think the problem may be that when this REXX was written and tested, the code for the concatenation character was an exclamation mark rather than the standard pipe symbol.
Try changing them in the REXX code
C '5A'X '4F'X ALL
Well, it was '5A'X here |
|
Back to top |
|
|
hchinnam
New User
Joined: 18 Oct 2006 Posts: 73
|
|
|
|
expat wrote: |
C '5A'X '4F'X ALL
|
Ha Ha, Direct hit. Thanks Expat it works now.
I was searching all the manual to find out what it means to have "!" in CSIOPTS. |
|
Back to top |
|
|
anoopn1985
New User
Joined: 23 Apr 2007 Posts: 16 Location: tvm
|
|
|
|
I don know CSI. :-(
Any other utilities |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I did research the EXCLUDE DD * part after the original post of the code and you can use a single *, for example
//EXCUDE DD *
HLQ.ABCDE*
which will exclude all datasets starting HLQ.ABCDE from processing or listing.
Unfortunately the code was as complex as the exclude processing requirement was at the time when I wrote the program. You can also use the fully qualified dsn in exclude as well as generics together. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
anoopn1985 wrote: |
I don know CSI.
Any other utilities |
The solution is REXX, CSI is just an IBM supplied module which is called by the REXX code.
The JCL and REXX code is all supplied in the link I originally gave you, but do not forget to changes the '5A'X to '4F'X in the REXX otherwise it may not work.
You don't need to be a rocket scientist to work out how the job goes |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
the dataset organization is irrelevant for a delete operation
for simple filtering an idcams delete might be enough
Code: |
//ams exec pgm=idcams
//sysin dd *
delete hlq1.hlq2.*.*
delete hlw1.hlq2.* |
the first delete will delete dataset with 4 qualifiers matching hlq1 and hlq2
the second one will match on three qualifier
for more sophisticated filtering check the DFDSS capablities
here is a related topic
http://ibmmainframes.com/viewtopic.php?t=29913&highlight=dfdss+filtering |
|
Back to top |
|
|
|