Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to delete number of similar PDSs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to delete number of similar PDSs
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Sep 29, 2008 3:59 pm    Post subject:
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    Post subject: Reply to: How to delete number of similar PDSs
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Sep 29, 2008 5:05 pm    Post subject:
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Sep 29, 2008 6:32 pm    Post subject:
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Sep 29, 2008 6:58 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Sep 29, 2008 7:01 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Mon Sep 29, 2008 7:58 pm    Post subject: Reply to: How to delete number of similar PDSs
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts how to mask the phone number kumarinfy DB2 4 Mon Apr 03, 2017 5:23 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us