View previous topic :: View next topic |
Author |
Message |
ANDY Beginner
Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Wed Dec 14, 2005 12:04 am Post subject: How to move file to different volume ? |
|
|
Hi all,
I have a PDS file in volume DMTP03. How can I move it to other volume like DMTP01 _________________ cheers,
Andy |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Wed Dec 14, 2005 1:57 am Post subject: |
|
|
Andy,
I am not sure if there is a better way but the basic method is to use a JCL as shown below (COPY & DELETE)
Code: |
//STEP01 EXEC PGM=SORT
//SORTIN DD DSN=YOUR.INPUT.FILE.DMTP03,
// DISP=(MOD,DELETE,KEEP)
//SORTOUT DD DSN=YOUR.OUTPUT.FILE.DMTP01,
// DISP=(NEW,CATLG,DELETE),
// UNIT=xxxxx,
// VOL=SER=(DMTP01)
//.....
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
/*
|
Thanks,
Phantom |
|
Back to top |
|
|
warp5 Intermediate
Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Wed Dec 14, 2005 2:28 am Post subject: |
|
|
I would recommend using ADRDSSU. The following job will move the dataset.
Code: |
//MOVEFILE EXEC PGM=ADRDSSU,REGION=2M
//SYSPRINT DD SYSOUT=*
//DD1 DD UNIT=3390,VOL=(PRIVATE,SER=invols),DISP=SHR
//DD2 DD UNIT=3390,VOL=(PRIVATE,SER=outvol),DISP=OLD
//SYSIN DD *
COPY DS ( -
INC(datasetname)) -
INDDNAME(DD1) -
OUTDDNAME(DD2) -
DELETE -
ALLDATA(*) -
ALLEXCP -
SPHERE -
TOL(ENQF) -
RENAMEU((oldname -
newname)) -
RECATALOG(newcatalog)
/*
|
|
|
Back to top |
|
|
MikeBaker Beginner
Joined: 04 May 2004 Posts: 96 Topics: 9
|
Posted: Wed Dec 14, 2005 4:26 am Post subject: |
|
|
Just be aware though, that having a different volume id does not also necessarily mean that it is on a different physical dasd volume (or tape if you were talking about tapes). It may well be the same physical disk/tape. |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Dec 14, 2005 10:10 am Post subject: |
|
|
How is that, Mike? Are you referring to the fact that most dasd is virtual these days or is there a method for identifying the same pack w/ multiple volume ids? I ask that because last week I had to write a small dialog to let people create ADRDSSU JCL to move data to a shared pack so we could shut down a test system and so Andy's question comes at a good time. |
|
Back to top |
|
|
MikeBaker Beginner
Joined: 04 May 2004 Posts: 96 Topics: 9
|
Posted: Wed Dec 14, 2005 4:49 pm Post subject: |
|
|
Semigeezer,
Yes, that's because the dasd & tapes are virtual. Even the Drives are virtual (as I found out last week). I don't know how to distinguish what virtual volume ids have been assigned to each physical pack - mainly because I have not asked our guy how do it - and assuming we would have access to any necessary software tools. This became important for us just recently, because we were backing up certain critical DB data onto what we thought were three physically separate tapes (in case of DR need), however after talking to the storage guru, we found out that this was not the case. According to our storage expert, it is now impossible (at our site anyway) for us to control where our stuff goes - in terms of actual physical tapes. The only way for us to guarantee that our stuff is on physically separate tapes is to supply our guy with an actual list of the dsns, and these go into an HSM table. |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Dec 14, 2005 8:00 pm Post subject: |
|
|
Oh for the days when I'd walk over to a huge bank of tape drives, mount a 6250bpi reel and watch the tape get sucked into the vacuum mechanism never to be usable again! Sure, the tape was destroyed, but at least I knew where my data was. |
|
Back to top |
|
|
ANDY Beginner
Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Thu Dec 15, 2005 2:09 am Post subject: |
|
|
Hi all,
The following job can copy the data set to different volume by random. How can I put it into my desired volume ?
//COPY EXEC PGM=ADRDSSU,REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
COPY -
DATASET( -
INCLUDE(ANDY.TEST.TRY1)) -
OUTDYNAM(WOK14Q) -
DELETE
/* _________________ cheers,
Andy |
|
Back to top |
|
|
warp5 Intermediate
Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Thu Dec 15, 2005 3:23 am Post subject: |
|
|
semigeezer (always amused by that name), even though disks nowadays are virtuell, MVS (or ZOS) still logically uses them as if they were physically available - things like enques, vtoc's, sms or nonsms volumes - they all still play important roles. |
|
Back to top |
|
|
taltyman JCL Forum Moderator
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Thu Dec 15, 2005 8:25 am Post subject: |
|
|
For dasd you can try migrating the dataset and recalling it to a different volser. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
|
Back to top |
|
|
ANDY Beginner
Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Fri Dec 16, 2005 8:54 pm Post subject: |
|
|
Yes, I have tried Warp5's solution but fail.
I believe the system be controled by SMS. Even you want to create a new data set by pointing out volser, the data set will not be created at your desired volume. I think the way should be on control SMS like give parameter on storageclass,dataclass,etc. _________________ cheers,
Andy |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Sat Dec 17, 2005 9:34 am Post subject: |
|
|
Quote: |
Yes, I have tried Warp5's solution but fail.
|
Andy,
Whenever you say something does not work then you need to provide us with details like error messages
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|