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

Delete Data sets with similar names


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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
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
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: 771
Location: Germany

PostPosted: Fri Jun 20, 2008 1:17 pm
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
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
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: 1287
Location: Chennai, India

PostPosted: Fri Jun 20, 2008 2:52 pm
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
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: 8796
Location: Welsh Wales

PostPosted: Thu Jul 17, 2008 2:36 pm
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
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: 8796
Location: Welsh Wales

PostPosted: Thu Jul 17, 2008 3:00 pm
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
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
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: 8796
Location: Welsh Wales

PostPosted: Thu Jul 17, 2008 3:16 pm
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
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: 8796
Location: Welsh Wales

PostPosted: Thu Jul 17, 2008 3:32 pm
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: 8796
Location: Welsh Wales

PostPosted: Thu Jul 17, 2008 4:11 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts db2 vs static data COBOL Programming 1
No new posts External data queue (changes?) CLIST & REXX 0
No new posts Pull data using date difference betwe... DB2 6
No new posts fast data scrambling PL/I & Assembler 10
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
Search our Forums:

Back to Top