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
 

 

Delete Data sets with similar names

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
rohanatl

New User


Joined: 21 Oct 2005
Posts: 22

PostPosted: Fri Jun 20, 2008 9:53 am    Post subject: Delete Data sets with similar names
Reply with quote

Hi all,
I want to delete some data sets in which the first 4 qualifiers are same and the last qualifier is unique value,some thing like
XXX.YYY.ZZZ.AAA.1DE
XXX.YYY.ZZZ.AAA.666
XXX.YYY.ZZZ.AAA.FFF
XXX.YYY.ZZZ.AAA.SWE
XXX.YYY.ZZZ.AAA.456
Can i delete these data set's using a jcl
Some thng like
delete XXX.YYY.ZZZ.AAA.*



Thanks in Advance
Back to top
View user's profile Send private message

harsh singh

New User


Joined: 11 Dec 2007
Posts: 26
Location: INDIA

PostPosted: Fri Jun 20, 2008 10:53 am    Post subject:
Reply with quote

we can delete it by using IDCAMS
Please look below code:


//STEP01A EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DELETE XXX.YYY.ZZZ.AAA.*
/*


Hope this works for u
Back to top
View user's profile Send private message
birdy K

New User


Joined: 05 Mar 2008
Posts: 72
Location: chennai

PostPosted: Fri Jun 20, 2008 10:56 am    Post subject:
Reply with quote

If you need to delete, you can use just "D" command in 3.4. Can you please tell us why you need JCL? Or this delete has to be done only thru JCl?
I think you can use symbolic parameter for last qualifier and You can delete using mod,delete,delete
Back to top
View user's profile Send private message
rohanatl

New User


Joined: 21 Oct 2005
Posts: 22

PostPosted: Fri Jun 20, 2008 11:01 am    Post subject:
Reply with quote

Hi Harish
There is a small change in the requiremnet
is it possible to delete someting like this

DELETE XXX.YYY.ZZZ.AAA.A*
Back to top
View user's profile Send private message
harsh singh

New User


Joined: 11 Dec 2007
Posts: 26
Location: INDIA

PostPosted: Fri Jun 20, 2008 11:16 am    Post subject:
Reply with quote

I am not sure but thinks no
and should encounter error message EITHER BAD CDSL CONTROL
BLOCK OR DSN MASK NOT ALPHA OR STARTING WITH #,$,@.

Please take others advice too.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Fri Jun 20, 2008 1:17 pm    Post subject:
Reply with quote

Morning Sir !

IDCAMS with DELETE XXX.YYY.ZZZ.AAA.A* will not work.

DELETE J120830.MIA01250.S307.COMPS3.COMP*
IDC3202I ABOVE TEXT BYPASSED UNTIL NEXT COMMAND.
CONDITION CODE IS 12

For that you could use the ADRDSSU.

//STEP0001 EXEC PGM=ADRDSSU,PARM='TYPRUN=NORUN'
//SYSPRINT DD SYSOUT=*
//JUNK DD DUMMY
//SYSIN DD *
DUMP DATASET(INCLUDE(HLQ.NLQ.**) -
OUTDD(JUNK) DELETE

...NORUN is for Simulate-testing only

Plse, read more about ADRDSSU in Bookmanager
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Jun 20, 2008 1:19 pm    Post subject: Reply to: Delete Data sets with similar names
Reply with quote

Hi rohanatl

//STEP0010 EXEC PGM=ADRDSSU,REGION=0M,PARM='TYPRUN=NORUN'
//SYSPRINT DD SYSOUT=*
//DELETE DD DUMMY
//SYSIN DD *
DUMP DATASET(INCLUDE(DEV2.RK.TEST.DELET.FILE*)) -
OUTDD(DELETE) DELETE
//*


Use this JCL for ur requirement......

Also remove the PARM parameter for delelting....
Back to top
View user's profile Send private message
rohanatl

New User


Joined: 21 Oct 2005
Posts: 22

PostPosted: Fri Jun 20, 2008 2:32 pm    Post subject:
Reply with quote

Hi karthikr44
Thanks a lot ur jcl is woking fine for me .... icon_biggrin.gif
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Jun 20, 2008 2:52 pm    Post subject: Reply to: Delete Data sets with similar names
Reply with quote

Rohan,

You can also try using TSO in batch , IKJEFT01 for deleting the datasets.
Back to top
View user's profile Send private message
trilokdewangan

New User


Joined: 19 Jun 2008
Posts: 39
Location: USA

PostPosted: Thu Jul 17, 2008 2:30 pm    Post subject:
Reply with quote

Hi all,

I saw the above solution, That will help me in my application also. But my requirement is different, I want to alter the retention period of all datasets starts with XXX.YYY.AAA.*.BBB.

Please suggest.

Thank you
Trilok Kumar
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: Thu Jul 17, 2008 2:36 pm    Post subject:
Reply with quote

What have you tried and what errors did you receive ?
Back to top
View user's profile Send private message
trilokdewangan

New User


Joined: 19 Jun 2008
Posts: 39
Location: USA

PostPosted: Thu Jul 17, 2008 2:41 pm    Post subject:
Reply with quote

I did not tried yet... I am not sure about the Syntex to alter the retantion period of dataset. I read about ADRDSSU utility in IBM site, I don't fine the syntex.

Could you please give syntex or link to get the syntex.
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: Thu Jul 17, 2008 3:00 pm    Post subject:
Reply with quote

You should be using IDCAMS and not DFdss (ADRDSSU)
Back to top
View user's profile Send private message
trilokdewangan

New User


Joined: 19 Jun 2008
Posts: 39
Location: USA

PostPosted: Thu Jul 17, 2008 3:02 pm    Post subject:
Reply with quote

okay, Thanks for quick response...could you please send me syntex or JCL for that?
Back to top
View user's profile Send private message
P.RAJESH
Currently Banned

New User


Joined: 20 Mar 2008
Posts: 54
Location: chennai

PostPosted: Thu Jul 17, 2008 3:14 pm    Post subject:
Reply with quote

hi,

can you give an exmaple.....
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: Thu Jul 17, 2008 3:16 pm    Post subject:
Reply with quote

trilokdewangan wrote:
okay, Thanks for quick response...could you please send me syntex or JCL for that?


Usual response - just as soon as you have sent me my 600 euro daily rate
Back to top
View user's profile Send private message
trilokdewangan

New User


Joined: 19 Jun 2008
Posts: 39
Location: USA

PostPosted: Thu Jul 17, 2008 3:18 pm    Post subject:
Reply with quote

Yes, sure...Say I have following datasets with permanent retention period.

XXX.YYY.AAA.123.CCC
XXX.YYY.AAA.122.CCC
XXX.YYY.AAA.133.CCC
XXX.YYY.AAA.144.CCC
XXX.YYY.AAA.155.CCC
XXX.YYY.AAA.166.CCC
XXX.YYY.AAA.177.CCC
XXX.YYY.AAA.188.CCC
...........
..... so on.

I want to alter the retention period of these all datasets like XXX.YYY.AAA.*.CCC from permanent to 90 days.
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: Thu Jul 17, 2008 3:32 pm    Post subject:
Reply with quote

Look at http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dgt1v403/CCONTENTS
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: Thu Jul 17, 2008 4:11 pm    Post subject:
Reply with quote

Of course another thing to consider is the media factor. If these are on tape then the same retention information needs to be transmitted to the TMS, and if they are on DASD, then perhaps a MGMTCLAS may need to be changed as products like DFhsm tend to use SMS MGMTCLAS rather than RETPD / EXPDT.
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 JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


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