Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Copy physical Tape files to a Mainframe file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Copy physical Tape files to a Mainframe file
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

Senior Member


Joined: 21 Sep 2010
Posts: 2181
Location: NY,USA

PostPosted: Thu May 16, 2019 11:29 pm    Post subject:
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    Post subject: Hi Rohit Thank you for a quick reply
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

Senior Member


Joined: 21 Sep 2010
Posts: 2181
Location: NY,USA

PostPosted: Thu May 16, 2019 11:48 pm    Post subject:
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    Post subject: Yes
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: 8456
Location: Dubuque, Iowa, USA

PostPosted: Fri May 17, 2019 12:07 am    Post subject: Reply to: Copy physical Tape files to a Mainframe file
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 https://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: 8456
Location: Dubuque, Iowa, USA

PostPosted: Fri May 17, 2019 12:09 am    Post subject: Reply to: Copy physical Tape files to a Mainframe file
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    Post subject: Thank you
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

Senior Member


Joined: 21 Sep 2010
Posts: 2181
Location: NY,USA

PostPosted: Fri May 17, 2019 12:28 am    Post subject:
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

Active User


Joined: 29 Apr 2008
Posts: 475
Location: Maryland

PostPosted: Sat May 18, 2019 1:44 am    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 2181
Location: NY,USA

PostPosted: Tue May 21, 2019 12:19 am    Post subject:
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: 738
Location: The Universe

PostPosted: Wed May 22, 2019 6:58 am    Post subject: Re: Yes
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    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 Need to write the date at the end of ... Poha Eater DFSORT/ICETOOL 2 Tue Jul 23, 2019 2:33 pm
No new posts Mainframe - PL1, JCL, DB2 opening - 5... Rathish123 Mainframe Jobs 0 Tue Jul 16, 2019 8:13 pm
No new posts Access file which has DSNTYPE=LIBRARY maxsubrat JCL & VSAM 11 Fri Jun 21, 2019 4:09 pm
No new posts The oldest active mainframe developer? John Poulakos General Talk & Fun Stuff 5 Fri Jun 14, 2019 9:24 pm
No new posts Mainframe to linux file count mismatch shreya19 All Other Mainframe Topics 4 Thu Jun 13, 2019 9:49 pm

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