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

How to delete number of similar PDSs


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anoopn1985

New User


Joined: 23 Apr 2007
Posts: 16
Location: tvm

PostPosted: Mon Sep 29, 2008 3:53 pm
Reply with quote

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
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Mon Sep 29, 2008 3:57 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Sep 29, 2008 3:59 pm
Reply with quote

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
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Mon Sep 29, 2008 4:01 pm
Reply with quote

hI,

Try below one,

Code:

//HDELET EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
HDELETE 'ANOOP.ABC*.*'
/*


Regards
R KARTHIK
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Mon Sep 29, 2008 4:38 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Sep 29, 2008 5:05 pm
Reply with quote

THIS is the link to the manual.

You need Appendix C to see the program specification and related information.
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Mon Sep 29, 2008 5:31 pm
Reply with quote

Thanks for the manual.
Back to top
View user's profile Send private message
anoopn1985

New User


Joined: 23 Apr 2007
Posts: 16
Location: tvm

PostPosted: Mon Sep 29, 2008 6:19 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Sep 29, 2008 6:32 pm
Reply with quote

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 icon_lol.gif
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Mon Sep 29, 2008 6:42 pm
Reply with quote

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. icon_wink.gif
Back to top
View user's profile Send private message
anoopn1985

New User


Joined: 23 Apr 2007
Posts: 16
Location: tvm

PostPosted: Mon Sep 29, 2008 6:55 pm
Reply with quote

I don know CSI. :-(

Any other utilities
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Sep 29, 2008 6:58 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Sep 29, 2008 7:01 pm
Reply with quote

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 icon_lol.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10833
Location: italy

PostPosted: Mon Sep 29, 2008 7:58 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
No new posts Count the number of characters in a f... CA Products 1
No new posts Delete file row if blanks in the firs... DFSORT/ICETOOL 5
No new posts volume mass delete RMM JCL & VSAM 2
No new posts Want to mask Middle 8 Digits of Debit... COBOL Programming 3
Search our Forums:

Back to Top