View previous topic :: View next topic
|
Author |
Message |
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Hi:
I want to uncatalog and delete a tape dataset.
Please give a JCL code that does it.
Thanks in Advance |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
You can use the IDCAMS command,
Delete 'DS.TAPE',PURGE
Typically in a Shop if you delete a Tape, what you are doing is just Uncataloging it, and not deleting the data present in the Tape itself. Every day a Job (I am not able to remember what the Job actually does) would be run to reclaim the Uncatalogued Tape to be availabe for future uses. That means you can retrieve the data from the tape before the Job is run, even though you have 'deleted' it. |
|
Back to top |
|
|
Jag
New User
Joined: 07 Dec 2005 Posts: 30 Location: India
|
|
|
|
//Job statement.......
//STep01 exec pgm=IEFBR14
//dd1 dd dsn=YOUR DDNAME,disp=(old,UNCATLG)
//
Upon the succesfull execution of the job..The dataset will be uncataloged..
Please let me know if i am wrong..
Cheers,
Jag |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
Your Job will uncatalogue a Dataset, but I am not sure if this Uncatalogued Tape will be reclaimed for future uses, your Tape support Guys may know better. But if you use the below IDCAMS step, the tape will be reclaimed for future uses automatically.
Code: |
//LISTCAT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
Delete 'DS.TAPE' PURGE
/* |
|
|
Back to top |
|
|
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Hi die7nadal:
I have coded 2 steps using IEFBR14 like below to uncatlog and delete the Tape datasets.
//D256193D JOB 'DPINC117','ASWINI',CLASS=X,
// MSGLEVEL=(1,1),NOTIFY=&SYSUID,MSGCLASS=X
//UNCDEL EXEC PGM=IEFBR14
//SYSUT1 DD DSN=OFFSITE.DIS001D.G0002V00,
// DISP=(MOD,UNCATLG,UNCATLG)
//SYSUT2 DD DSN=OFFSITE.DIS001D.G0002V00,
// DISP=(MOD,DELETE,DELETE)
//SYSIN DD *
Please correct me if I m wrong. |
|
Back to top |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
You cannot use this method to delete Tapes, you have to use IDCAMS. |
|
Back to top |
|
|
sundaresanjs
New User
Joined: 29 May 2006 Posts: 18 Location: USA
|
|
|
|
hai monasu1998,
you can use the utility IEHPROGM which do the following things
1. Scratches datasets or member of a PDS on a DASD vol
2. Renames the datasets or members
3. Catalogs or Uncatalogs the datasets
4. Builds or deletes a catlog index
5. builds or deletes a GDG
example for delete
//JOBID JOB SUNDAR,'CHENNAI'
//STEP1 EXEC PGM=IEHPROGM
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD UNIT=TAPE,VOL=SER=SMS009 (SERIAL NUMBER)
//SYSIN DD *
DELETE DSNAME=DATA1.SSS,VOL=SER=SMS009 -
PURGE
/*
//
note me if there is any mistake
regards
Sundaresan J |
|
Back to top |
|
|
|