View previous topic :: View next topic
|
Author |
Message |
rohanatl
New User
Joined: 21 Oct 2005 Posts: 22
|
|
|
|
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 |
|
|
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
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 |
|
|
birdy K
New User
Joined: 05 Mar 2008 Posts: 72 Location: chennai
|
|
|
|
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 |
|
|
rohanatl
New User
Joined: 21 Oct 2005 Posts: 22
|
|
|
|
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 |
|
|
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
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 |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
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 |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
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 |
|
|
rohanatl
New User
Joined: 21 Oct 2005 Posts: 22
|
|
|
|
Hi karthikr44
Thanks a lot ur jcl is woking fine for me .... |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Rohan,
You can also try using TSO in batch , IKJEFT01 for deleting the datasets. |
|
Back to top |
|
|
trilokdewangan
New User
Joined: 19 Jun 2008 Posts: 39 Location: USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
What have you tried and what errors did you receive ? |
|
Back to top |
|
|
trilokdewangan
New User
Joined: 19 Jun 2008 Posts: 39 Location: USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
You should be using IDCAMS and not DFdss (ADRDSSU) |
|
Back to top |
|
|
trilokdewangan
New User
Joined: 19 Jun 2008 Posts: 39 Location: USA
|
|
|
|
okay, Thanks for quick response...could you please send me syntex or JCL for that? |
|
Back to top |
|
|
P.RAJESH Currently Banned New User
Joined: 20 Mar 2008 Posts: 54 Location: chennai
|
|
|
|
hi,
can you give an exmaple..... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
trilokdewangan
New User
Joined: 19 Jun 2008 Posts: 39 Location: USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
|