|
|
| Author |
Message |
gomu_mm
New User
Joined: 05 Dec 2006 Posts: 12 Location: Chennai
|
|
|
|
Hi,
I have few datasets like
XL70.STORE.B2150.DATA1
XL70.STORE.B2150.DATA2
XL70.STORE.B2150.DATA3
XL70.STORE.B2150.DATA4
So the last qualifier varies for the datsets. I need to delete these datasets through a JCL.
Please suggest. |
|
| Back to top |
|
 |
References
|
|
 |
Moved: Mon May 12, 2008 8:31 pm by superk From DFSORT/ICETOOL to SMS & VSAM |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3309 Location: Charlotte,NC USA
|
|
| Back to top |
|
 |
Ramesh.S
New User
Joined: 08 Jan 2007 Posts: 2 Location: chennai
|
|
|
|
Me too having the same requirement as like Gomms..
my datasets will be like as follows
NGT.BR5656.DAY1
NGT.BR5656.DAY2
NGT.BR5656.DAY3
NGT.BR5656.DAY4
NGT.BR5656.DAY5
NGT.BR5656.DAY6
NGT.BR5656.DAY7
i want to delete files like NGT.BR5656.DAY1
NGT.**.b*nnnn.* |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3309 Location: Charlotte,NC USA
|
|
|
|
The answer is still the same.
You'll either use a job step with all of the datasets specified with DISP=(MOD,DELETE,DELETE):
| Code: |
//DELETE EXEC PGM=IEFBR14
//DD1 DSN=XL70.STORE.B2150.DATA1,DISP=(MOD,DELETE,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(0))
//DD2 DSN=XL70.STORE.B2150.DATA2,DISP=(MOD,DELETE,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(0))
//DD3 DSN=XL70.STORE.B2150.DATA3,DISP=(MOD,DELETE,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(0))
//DD4 DSN=XL70.STORE.B2150.DATA4,DISP=(MOD,DELETE,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(0))
|
or as input to IDCAMS:
| Code: |
//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE XL70.STORE.B2150.DATA1
DELETE XL70.STORE.B2150.DATA2
DELETE XL70.STORE.B2150.DATA3
DELETE XL70.STORE.B2150.DATA4
/*
|
or to ADRDSSU:
| Code: |
//DELETE EXEC PGM=ADRDSSU,REGION=0M,PARM='TYPRUN=NORUN'
//SYSPRINT DD SYSOUT=*
//DELETE DD DUMMY
//SYSIN DD *
DUMP DATASET(INCLUDE(XL70.STORE.B2150.*)) -
OUTDD(DELETE) DELETE
//*
|
|
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 666
|
|
|
|
Hi,
you can use IDCAMS
| Code: |
//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE XL70.STORE.B2150.*
|
Gerry |
|
| Back to top |
|
 |
piyush_is_here Currently Banned New User
Joined: 28 May 2008 Posts: 2 Location: NOIDA
|
|
|
|
for deleting can we use
OLD istead of MOD...
//DELETE EXEC PGM=IEFBR14
//DD1 DSN=XL70.STORE.B2150.DATA1,DISP=(OLD,DELETE,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(0))
please correct... |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3551 Location: Brussels once more ...
|
|
|
|
| Yes, of course you can, but MOD was specified for a very good reason. |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 666
|
|
|
|
Hi,
if you are going to use DISP=(OLD,DELETE.DELETE) then no need to code UNIT & SPACE parameters.
If the dataset does not exist it will be a JCL error, that's why people opt for the MOD instead of OLD.
IDCAMS is still the best option.
Gerry |
|
| Back to top |
|
 |
|
|