Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Deleting tape dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
d_sarlie

New User


Joined: 22 Apr 2008
Posts: 32
Location: coimbatore

PostPosted: Fri Sep 28, 2012 11:36 am    Post subject: Deleting tape dataset
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: 1715
Location: UK

PostPosted: Fri Sep 28, 2012 11:52 am    Post subject:
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: 785
Location: Chennai, India

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

Or IDCAMS DELETE?
http://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: 1715
Location: UK

PostPosted: Fri Sep 28, 2012 11:55 am    Post subject:
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: 785
Location: Chennai, India

PostPosted: Fri Sep 28, 2012 12:06 pm    Post subject:
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: 1715
Location: UK

PostPosted: Fri Sep 28, 2012 1:38 pm    Post subject:
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: 1715
Location: UK

PostPosted: Sat Sep 29, 2012 12:16 am    Post subject:
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

Site Director


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

PostPosted: Sat Sep 29, 2012 1:42 am    Post subject:
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    Post subject: Hello
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

Site Director


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

PostPosted: Mon Oct 01, 2012 2:03 am    Post subject:
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    Post subject: The Same
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

Site Director


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

PostPosted: Wed Jun 26, 2013 2:02 am    Post subject:
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    Post subject: Yes
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 2 Fri Dec 09, 2016 10:57 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts stacking files on a tape Pedro JCL & VSAM 7 Wed Aug 17, 2016 11:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us