View previous topic :: View next topic
|
Author |
Message |
yianis
New User
Joined: 14 Aug 2006 Posts: 45
|
|
|
|
How can you delete a set of datasets using a wildard?
Example:
If I have the following datasets:
HLVL.XXX.YYY.TEST1
HLVL.XXX.YYY.TEST2
HLVL.XXX.YYY.TEST3.abc
HLVL.XXX.YYY.TEST4
HLVL.XXX.YYY.TEST5
HLVL.XXX.YYY.TEST6.xyz
etc..
and I want to to delete in a bacth jcl job
all datasets that start with:
HLVL.XXX.YYY.T*
Thanks |
|
Back to top |
|
|
yianis
New User
Joined: 14 Aug 2006 Posts: 45
|
|
|
|
found the answer in SMS & VSAM forum...sorry for the post..
ibmmainframes.com/viewtopic.php?t=10190&highlight=adrdssu
Code: |
//STEP0010 EXEC PGM=ADRDSSU,REGION=0M,PARM='TYPRUN=NORUN'
//SYSPRINT DD SYSOUT=*
//DELETE DD DUMMY
//SYSIN DD *
DUMP DATASET(INCLUDE(MYPDS.TEST.*)) -
OUTDD(DELETE) DELETE
//* |
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Just note that you have to use the level down to the node, i.e.
HLVL.TTT.YYY.TEST1.*
HLVL.TTT.YYY.TEST2.*
will work
HLVL.TTT.YYY.TEST*
or
HLVL.TTT.YYY.T*
will not. |
|
Back to top |
|
|
dgokulakrishnan
New User
Joined: 01 Jun 2011 Posts: 5 Location: Chennai
|
|
|
|
Hi Yianis..
Even the below code snippet also deletes the dataset by using the wildcards.
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DELETE HLVL.XXX.YYY.*
/* |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Please note that it is best to reply to curretly active topics rather than one that is over 4 years inactive. . .
d |
|
Back to top |
|
|
|