View previous topic :: View next topic
|
Author |
Message |
Dadi Krishna Teja
New User
Joined: 16 May 2019 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
Back to top |
|
|
Dadi Krishna Teja
New User
Joined: 16 May 2019 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
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 |
|
|
Dadi Krishna Teja
New User
Joined: 16 May 2019 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Dadi Krishna Teja
New User
Joined: 16 May 2019 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Welcome!.
I think , you can also use IDCAMS - REPRO as well. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2139 Location: USA
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Agree and thanks Sergeyken. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
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 |
|
|
|