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

How to copy tape to tape?


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

New User


Joined: 06 Jul 2005
Posts: 6

PostPosted: Mon Feb 09, 2009 10:58 pm
Reply with quote

Hi,

I need some help about sample JOB/JCL or utility for copy tape (multi files) to another tape (~clone tape).




Help pls,
ThankYou.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Mon Feb 09, 2009 11:04 pm
Reply with quote

Do you want it cloned to the same VOLSER or is a different VOLSER on the output OK?
Back to top
View user's profile Send private message
spcichk

New User


Joined: 06 Jul 2005
Posts: 6

PostPosted: Mon Feb 09, 2009 11:53 pm
Reply with quote

Different VOLSER on output.
Can i use IEBCOPY or IEBGENER?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Feb 10, 2009 12:21 am
Reply with quote

You can also use IDCAMS REPRO.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Feb 10, 2009 12:22 am
Reply with quote

IEBCOPY handles PDS and PDSE files -- not sequential tapes.

IEBGENER may (or may not) be able to do the copy -- it depends on what created the original file. DF/DSS, for example, specifically says the COPYDUMP facility is the only approved way to copy a DF/DSS dump data set.

IDCAMS REPRO could be used instead of IEBGENER for most files (except DF/DSS dumps).
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: Tue Feb 10, 2009 12:42 am
Reply with quote

Hello,

Do not double-post the same question in multiple parts of the forum (even if the wording is slightly changed).

For whatever reason you did not mention (this time) that the tape is a db2 backup. . .
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Tue Feb 10, 2009 2:19 am
Reply with quote

Standard copy utilities will not copy multiple files on the tape automatically. You'd need a copy step for each file, with VOL=REF=, LABEL=, and UNIT=AFF= on the output DD to stack on the same tape.
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Tue Feb 10, 2009 1:04 pm
Reply with quote

If you are using FILEAID then you can copy multiple files in a single STEP in JCL. I tested the below JCL

Code:

//STEP030  EXEC PGM=FILEAID                                             
//DD01     DD DSN=DKAR.CP000000.IHUK.FFT.AMPH2.G140.G0001V00,DISP=SHR   
//DD02     DD DSN=DKAR.CP000000.IHUK.FFT.AMPH2.G140.G0001V00,DISP=SHR   
//DD01O    DD DSN=&SYSUID..CP000000.IHUK.FFT.AMPH21,                   
//            DISP=(NEW,CATLG,DELETE),                                 
//            UNIT=TAPE,                                               
//            VOL=(,,,25),                                             
//            LABEL=(1,SL,EXPDT=99000),                                 
//            SPACE=(TRK,(750,300),RLSE),                               
//            DCB=(SYS1.DSCB,RECFM=FB,LRECL=0,BLKSIZE=0)               
//DD02O    DD DSN=&SYSUID..CP000000.IHUK.FFT.AMPH22,                   
//            DISP=(NEW,CATLG,DELETE),                                 
//            UNIT=AFF=DD01O,                                           
//            VOL=(,,,25),                                             
//            LABEL=(1,SL,EXPDT=99000),                                 
//            SPACE=(TRK,(750,300),RLSE),                               
//            DCB=(SYS1.DSCB,RECFM=FB,LRECL=0,BLKSIZE=0)               
//SYSOUT   DD SYSOUT=*                                                 
//SYSPRINT DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//SYSDBOUT DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
$$DD01     COPYALL   
$$DD02     COPYALL   
/*                   



It copies tape file DD01 to DD01O and DD02 to DD02O . To make sure that all the output tape files are created on the same tape for DD01O give the required VOL=REF=, LABEL=, and UNIT=AFF=. For all subsequent output files like DD02O just mention UNIT=AFF=DD01O. This will ensure that DD02O is created on the same tape as DD01O.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Feb 10, 2009 1:19 pm
Reply with quote

Quote:
For all subsequent output files like DD02O just mention UNIT=AFF=DD01O. This will ensure that DD02O is created on the same tape as DD01O.

This will ensure that DD02O uses the same output (physical or virtual) unit as DD01O, not nessecarily the same tape.
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 VB to VB copy - Full length reached SYNCSORT 8
No new posts Deleting a Tape file JCL & VSAM 14
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top