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

Copy physical Tape files to a Mainframe file


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

New User


Joined: 16 May 2019
Posts: 5
Location: India

PostPosted: Thu May 16, 2019 10:25 pm
Reply with quote

Need to copy physical tape files which is loaded to a system. I know the Volser and UNIT parameters of the file. But How do I copy those to a Mainframe file? Please help. I have not faced these kind of issues before.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu May 16, 2019 11:29 pm
Reply with quote

Copy From Tape (CPYFRMTAP)
Back to top
View user's profile Send private message
Dadi Krishna Teja

New User


Joined: 16 May 2019
Posts: 5
Location: India

PostPosted: Thu May 16, 2019 11:36 pm
Reply with quote

But, can you let me know where and how I use this command? I mean is this used in TSO screen? or Windows Command prompt? or am I missing something else? I am very new to this and hope you will bare with me.

Regards,
Krishna.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu May 16, 2019 11:48 pm
Reply with quote

Are you just looking for a JCL which does copy from TAPE to a PS dataset ? If yes then there are many such topics discussed in past. Did you do any research before posting and being new to this work?
Back to top
View user's profile Send private message
Dadi Krishna Teja

New User


Joined: 16 May 2019
Posts: 5
Location: India

PostPosted: Thu May 16, 2019 11:55 pm
Reply with quote

Hi Rohit,

I am looking for a JCL which can copy data from a mounted Tape to a PS. I did research in this portal for that and couldn't find anything relevant. In many posts they are using IEBGENER or IEBCOPY utilities to do that. But in SYSUT1 they are using a mainframe file as an input. But in my case, I do not have a Mainframe file. System admin has mounted a physical Tape in the system and shared its details like UNIT,LABEL and VOLSER. Now I need to figure out a way to copy that physical tape file to a Mainframe file. Waiting for your help.

Regards,
Krishna.
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: Fri May 17, 2019 12:07 am
Reply with quote

First, a tape does not STAY mounted on a mainframe; it is mounted when a data set on the tape is referenced (either through the catalog or directly via the volume serial) and is unmounted when the referenced data set or volume serial is no longer needed.

Second, you do NOT copy the VOLSER and UNIT parameters from the tape -- they are characteristics of the tape drive (or disk drive or whatever) and are never copied.

Third, the CPYFRMTAP command references an IBM I Series machine which is not necessarily what you need -- if you're running on a system z machine then CPYFRMTAP does not exist.

Fourth, tape copies are usually done via batch job (most sites prohibit TSO users from directly referencing a tape, requiring instead that they use a batch job instead). Study the DFSMSdfp Utilities manual at www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zosv2r3sc236864/$file/idau100_v2r3.pdf for details. You can use IDCAMS or IEBGENER to copy the tape to disk, using something like
Code:
//COPYSTEP EXEC PGM=IEBGENER,REGION=8M
//SYSUT1   DD   DISP=OLD,DSN=<tape.dsn>
//SYSUT2   DD   DISP=OLD,DSN=<disk.dsn>
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   DUMMY
Note that this example assumes that you are copying from a cataloged data set on a tape to a cataloged data set on a disk drive. If either the tape or the disk data set is not cataloged, you have to add additional parameters (UNIT=<tape unit> and VOL=SER=<tape id> and possibly LABEL at a minimum for tape, UNIT, possibly VOL=SER, and DCB,SPACE if the data set does not yet exist for disk). Systems may use SMS (system-managed storage) which assigns disk data sets to storage pools and completes some of the required information for you.

And since tape drives units and volume serials, disk drive units and volume serials generally vary from site to site you MUST discuss your copy with someone working AT YOUR SITE to get the correct syntax, unit names, and volume serials.
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: Fri May 17, 2019 12:09 am
Reply with quote

Quote:
But in my case, I do not have a Mainframe file.
In such a case, your first step would be to move the file to a mainframe data set. It is much more likely that your system staff is telling you information about the mainframe data set, but if not you cannot (easily) copy across systems. Talk to your systems staff about what you really have and what you need to do to copy the data.
Back to top
View user's profile Send private message
Dadi Krishna Teja

New User


Joined: 16 May 2019
Posts: 5
Location: India

PostPosted: Fri May 17, 2019 12:25 am
Reply with quote

Thank you soo much Robert, I got it now. Got the tape file from system and was able to copy it to PS file using IEBGENER utility.

Also Thank you Rohit.

Regards,
Krishna.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri May 17, 2019 12:28 am
Reply with quote

Welcome!.
I think , you can also use IDCAMS - REPRO as well.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Sat May 18, 2019 1:44 am
Reply with quote

Rohit Umarjikar wrote:
Welcome!.
I think , you can also use IDCAMS - REPRO as well.


All tape-specific activities are performed exclusively by zOS components, according to dataset specifications given by the programmer via tape-specific parameters of DD statement in JCL.

The application program itself has very little to nothing to do with the tape itself. That's why any of multiple programs/utilities supposed to work with sequential datasets (DSORG=PS), even the most primitive one, will do the job: IEBGENER, IEBPTPCH, IDCAMS, DFSORT, SYNCSORT, etc, etc, etc.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Tue May 21, 2019 12:19 am
Reply with quote

Agree and thanks Sergeyken.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Wed May 22, 2019 6:58 am
Reply with quote

Dadi Krishna Teja wrote:
... System admin has mounted a physical Tape in the system and shared its details like UNIT,LABEL and VOLSER. Now I need to figure out a way to copy that physical tape file to a Mainframe file. Waiting for your help. ...

In z/OS systems, a "system administrator" seldom, if ever, preloads a tape in the way the poster appears to specify. For the most part a tape is loaded into a tape drive only as specified in JCL when the system runs the JCL.

Early in the days of OS/360, tapes to be used as temporary storage could be pre loaded in the way the poster describes, but the user would not be aware of and would not specify the volume serials of the tape volumes. As disk storage grew in capacity and availability this practice quickly ceased.
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top