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

Deleting tape dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
d_sarlie

New User


Joined: 22 Apr 2008
Posts: 42
Location: coimbatore

PostPosted: Fri Sep 28, 2012 11:36 am
Reply with quote

Hi,

I need help to delete tape dataset using JCL

Can someone help me with it.

Thanks
Jeba
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Sep 28, 2012 11:52 am
Reply with quote

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
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Fri Sep 28, 2012 11:54 am
Reply with quote

Or IDCAMS DELETE?
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2I230/20.0?DT=20040628101835
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Sep 28, 2012 11:55 am
Reply with quote

IDCAMS is NOT JCL
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Fri Sep 28, 2012 12:06 pm
Reply with quote

Sorry, Nic. I should have mentioned, executing IDCAMS program with DELETE command through Job/JCL.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Sep 28, 2012 1:38 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat Sep 29, 2012 12:16 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Sep 29, 2012 1:42 am
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
umasankartt

New User


Joined: 14 Jul 2012
Posts: 10
Location: India

PostPosted: Mon Oct 01, 2012 1:01 am
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 01, 2012 2:03 am
Reply with quote

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
View user's profile Send private message
Dale Robertson

New User


Joined: 21 Jun 2013
Posts: 44
Location: U.S.A.

PostPosted: Wed Jun 26, 2013 1:54 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 26, 2013 2:02 am
Reply with quote

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
View user's profile Send private message
Dale Robertson

New User


Joined: 21 Jun 2013
Posts: 44
Location: U.S.A.

PostPosted: Wed Jun 26, 2013 2:35 am
Reply with quote

dick,

>>...specify UNIT=(CART,,DEFER). ...

definitely. agreed.

r

my mis-tack-ee.
--Curley

appy-poly-loggies.
--Alex - A Clockwork Orange.
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Deleting a Tape file JCL & VSAM 14
Search our Forums:

Back to Top