MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Renaming and Deleting tape file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
binoy
Beginner


Joined: 03 Oct 2003
Posts: 17
Topics: 7

PostPosted: Thu Feb 05, 2004 11:28 am    Post subject: Renaming and Deleting tape file Reply with quote

Hi,
I have a tape file
ATZZ.E6IMS.PSB75410.BI.PRVTPRV.D012104

Which i want to rename to

ATZZ.E6IMS.PSB75410.AI.PRVTPRV.D012104

or copy it to

ATZZ.E6IMS.PSB75410.AI.PRVTPRV.D012104

and then delete the old copy :
ATZZ.E6IMS.PSB75410.BI.PRVTPRV.D012104

Please suggest the JCl for this

Thanks & Regards,
Brij
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Thu Feb 05, 2004 11:45 am    Post subject: Reply with quote

binoy,

You cannot rename a tape dataset. So you can copy it to different name and then delete the orginal file.
Code:

//STEP0100  EXEC  PGM=SORT                       
//SYSOUT    DD SYSOUT=*                           
//SORTIN    DD DSN=ATZZ.E6IMS.PSB75410.BI.PRVTPRV.D012104,                                 
//             DISP=(OLD,DELETE,KEEP)
//SORTOUT   DD DSN=ATZZ.E6IMS.PSB75410.AI.PRVTPRV.D012104
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=TAPE,               
//             LABEL=(01,SL),VOL=(,,,99)
//SYSIN     DD *
   SORT FIELDS=COPY
//*


The disp=(old,delete,keep) will delete the sortin input dataset after the succesful completion of the job.

Or you can have seperate step for delete as shown below

Code:

//STEP0100  EXEC  PGM=SORT                       
//SYSOUT    DD SYSOUT=*                           
//SORTIN    DD DSN=ATZZ.E6IMS.PSB75410.BI.PRVTPRV.D012104,                                 
//             DISP=SHR
//SORTOUT   DD DSN=ATZZ.E6IMS.PSB75410.AI.PRVTPRV.D012104
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=TAPE,               
//             LABEL=(01,SL),VOL=(,,,99)
//SYSIN     DD *
   SORT FIELDS=COPY
//*
//STEP0200 EXEC PGM=IDCAMS                   
//SYSPRINT DD  SYSOUT=*                     
//SYSIN    DD  *                             
   DELETE ATZZ.E6IMS.PSB75410.BI.PRVTPRV.D012104
//*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
binoy
Beginner


Joined: 03 Oct 2003
Posts: 17
Topics: 7

PostPosted: Fri Feb 06, 2004 10:08 am    Post subject: Reply with quote

Thanks Kolusu,

I am not sure if deleting the tape dataset will release the space
or we need to scratch it , please suggest the process and the JCL
for the same .
And how to know the tape info

Regards,
Brij
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Fri Feb 06, 2004 10:58 am    Post subject: Reply with quote

Binoy,

Thanks Kolusu,

The default value for a DELETE statement is SCRATCH. so you don't need any additional parameters for scratching the dataset. Please be clear about what you meant by tape info?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group