View previous topic :: View next topic
|
Author |
Message |
d_sarlie
New User
Joined: 22 Apr 2008 Posts: 42 Location: coimbatore
|
|
|
|
Hi,
I need help to delete tape dataset using JCL
Can someone help me with it.
Thanks
Jeba |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Same way as any other dataset - IEFBR14. Or any other program that you need to execute - just add the extra DDNAME for one execution with a DISP of OLD,DELETE |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
IDCAMS is NOT JCL |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Sorry, Nic. I should have mentioned, executing IDCAMS program with DELETE command through Job/JCL. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Would still not have met the TS's requirements - through JCL - no mention of anything else and as he has been around for 4 years I presume he knows what he is talking about - although after 4 years he must have seen enough JCL and
Code: |
//STEP01 EXEC PGM=IEFBR14
//ddname DD DSN=dataset.to.be.deleted, etc |
to not need to ask. And the JCL manual specoifies how to DEFER tape mounting until an OPEN is issued. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Actually deleting the dataset on tape is a convoluted affair if you really want to get rid of the data. Normally you would just uncatalog the dataset and get the tape librarian to put the tape in the scratch pool. But if you really need to get rid of the data then you have to write another dataset over the top of it although I vaguely seem to remember from way back in the 70s you had to do something with new tapes but perhaps that was only initialise them which gave them therir volsers. But, if you just want it uncataloged then IEFBR14 will do nicely - possibly PGM=NOTFOUND will do the trick as well but I have not tried that. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Yup, when we scratched tapes with info that needed to be protected even after being scratched, we ran a process in the tape library to re-initialize the tape from front to back. Might keep the original volser or be assigned another. Of course that was when tapes were used much more because dasd was too expensive |
|
Back to top |
|
|
umasankartt
New User
Joined: 14 Jul 2012 Posts: 10 Location: India
|
|
|
|
If the Tape contains only one dataset which u need to delete means initialize the tape or else take the backup with same SL which u used for that dataset. for Ex. if u taken backup with SL-10 then try reuse the same SL-10 then it will ask for reuse reply in console or joblog just go ahead and it will replace your unneeded dataset |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
else take the backup with same SL which u used for that dataset. for Ex. if u taken backup with SL-10 then try reuse the same SL-10 then it will ask for reuse reply in console or joblog just go ahead and it will replace your unneeded dataset |
In theory, this sounds ok, but it is not guaranteed to destroy all of the sensitive data . . .
As you first mentioned, properly initializing the volume (all of it) will destroy anything on the volume. . . |
|
Back to top |
|
|
Dale Robertson
New User
Joined: 21 Jun 2013 Posts: 44 Location: U.S.A.
|
|
|
|
Jeba,
Unless you want to get ultra fancy you merely need to delete/uncatalog a tape dataset the same way as a file on DASD:
//JS1DEL EXEC PGM=IEFBR14
//DD1 DD DSN=TAPE.FILE,DISP=(MOD,DELETE),SPACE=(TRK,0)
That's it!! The big thing is that I believe that there will be a mount then a dismount JES message [uncertain if that's still true.] if it exists and with IEFBR14 running to completion - which it always does - then that file is uncataloged and deleted.
r
My head is going to explode!
--Anon. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
If done via JCL, usually it is best to specify UNIT=(CART,,DEFER). That way no mount is issued for the volume.
Also, if several tape datasets/volumes are to be "deleted", assign the second thru nth to UNIT=AFF=1stvol. |
|
Back to top |
|
|
Dale Robertson
New User
Joined: 21 Jun 2013 Posts: 44 Location: U.S.A.
|
|
|
|
dick,
>>...specify UNIT=(CART,,DEFER). ...
definitely. agreed.
r
my mis-tack-ee.
--Curley
appy-poly-loggies.
--Alex - A Clockwork Orange. |
|
Back to top |
|
|
|