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

How to copy a tape dataset to DASD?


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

New User


Joined: 02 Nov 2005
Posts: 66

PostPosted: Mon Jul 20, 2009 11:25 pm
Reply with quote

Hi,

Good day to you..

I have a dataset in tape. I want to copy this dataset to DASD into different DSN. I want the target dataset to have the exact DCB and space parameters of the source dataset which is in tape. Please let me know how to do that?

Also, Once a dataset has been moved to tape, how to identify whether it is PDS or PS? If a PDS or PS dataset has been moved tape, i believe it would always be copied as PS in tape. Then how would we determine whether it is a PS or PDS when we want to copy this back to DASD?

If you have sample jcl, please share.

Thanks in advance.
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 Jul 20, 2009 11:30 pm
Reply with quote

Hello,

Suggest you find the jcl that originally copied the dataset(s) to tape.

Use the same jcl with the input and output reversed and make any needed changes to the control statememts (if there are any). . .
Back to top
View user's profile Send private message
ignich7

New User


Joined: 02 Nov 2005
Posts: 66

PostPosted: Mon Jul 20, 2009 11:34 pm
Reply with quote

Thanks for the quick reply Dick. But unfortunately i could not locate the original JCL which was used to copy and thats why i asked for alternatives.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Jul 21, 2009 12:03 am
Reply with quote

In order to copy from tape to disk, you must know how the tape was created. If the tape was created using DF/DSS (ADRDSSU), then you must use ADRDSSU to restore the data set from tape to disk. A PDS copied to tape will be in IEBCOPY unload format (which is a sequential file, usually in variable blocked spanned format). If the tape file is fixed block, then IEBGENER or SORT was used to create a copy of a disk data set. However, there's a lot of ways to build a tape and you cannot always tell from inspection how the tape was built and how to restore the tape to disk.

If your site uses a tape management tool such as CA-1, query the volume in the tape management system and you should be able to find out what program was used to create the tape. A tape map program such as on the CBT tape can help identify the tape data format. Otherwise, you may have to dump the first block or two of data from the tape to see if there's enough helpful information to figure it out.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jul 21, 2009 1:58 am
Reply with quote

And I would not use the same DCB as used for tape as the blocksize may be opimum for tape, but definitely not optimum for DASD
Back to top
View user's profile Send private message
kalhor

New User


Joined: 20 May 2007
Posts: 31
Location: iran

PostPosted: Tue Jul 21, 2009 7:30 pm
Reply with quote

Hi,

this is one way which you can do it :
************************************
//UNLOADCA JOB CLASS=A
//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=A
//SOURCE DD DSN=TEST.TEST222,DISP=(OLD,KEEP),
// UNIT=CART,VOL=SER=DP0079
//DESTIN DD DSN=TEST.TEST444..&TI,DISP=(NEW,KEEP),
// UNIT=3390,VOL=SER=WORK01,SPACE=(CYL,(10,2)),
// DCB=BLKSIZE=80
//SYSIN DD *
COPY OUTDD=DESTIN,INDD=SOURCE
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jul 21, 2009 7:39 pm
Reply with quote

kalhor wrote:
Hi,
this is one way which you can do it :

And if the tape was created by FDR/DSF ???
Did you bother to read the good response from Robert ???
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 VB to VB copy - Full length reached SYNCSORT 8
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top