Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to copy a tape dataset to DASD?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to copy a tape dataset to DASD?
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

Site Director


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

PostPosted: Mon Jul 20, 2009 11:30 pm    Post subject:
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    Post subject:
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: 8201
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jul 21, 2009 12:03 am    Post subject:
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: 8620
Location: Back in jolly old England

PostPosted: Tue Jul 21, 2009 1:58 am    Post subject:
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    Post subject:
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: 8620
Location: Back in jolly old England

PostPosted: Tue Jul 21, 2009 7:39 pm    Post subject:
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    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 File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us