MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to move file to different volume ?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Wed Dec 14, 2005 12:04 am    Post subject: How to move file to different volume ? Reply with quote

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
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Dec 14, 2005 1:57 am    Post subject: Reply with quote

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
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Wed Dec 14, 2005 2:28 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
MikeBaker
Beginner


Joined: 04 May 2004
Posts: 96
Topics: 9

PostPosted: Wed Dec 14, 2005 4:26 am    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Dec 14, 2005 10:10 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
MikeBaker
Beginner


Joined: 04 May 2004
Posts: 96
Topics: 9

PostPosted: Wed Dec 14, 2005 4:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Dec 14, 2005 8:00 pm    Post subject: Reply with quote

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! Mr. Green Sure, the tape was destroyed, but at least I knew where my data was.
Back to top
View user's profile Send private message Visit poster's website
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Thu Dec 15, 2005 2:09 am    Post subject: Reply with quote

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
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Thu Dec 15, 2005 3:23 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Thu Dec 15, 2005 8:25 am    Post subject: Reply with quote

For dasd you can try migrating the dataset and recalling it to a different volser.
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Dec 16, 2005 1:36 am    Post subject: Reply with quote

ANDY,

Quote:

The following job can copy the data set to different volume by random. How can I put it into my desired volume ?


Did you ever try out Warp5's solution ????
http://www.mvsforums.com/helpboards/viewtopic.php?p=26281#26281

Thanks,
Phantom
Back to top
View user's profile Send private message
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Fri Dec 16, 2005 8:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Sat Dec 17, 2005 9:34 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group