View previous topic :: View next topic
|
Author |
Message |
cmsmoon
New User
Joined: 17 Jun 2010 Posts: 75 Location: Chennai
|
|
|
|
Hi ,
The requirement is we need to copy the datasets which the cataloged all the datasets to another datasets which under the below qualifiers.
XMMD01.DEVL.BR10.J* TO XMMD01.PROD.BR10.J*.D110414
how can we to this using REXX commands ? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
IGGCSIRX in SYS1.SAMPLIB is the extreme basic version of the utility which will list any datasets matching the input pattern supplied - which also works with * ** and %.
There is also a bit of code of mine out there CSIUTIL which uses IGGCSIRX and will give you the dataset name, volume, and migrate status.
From there you need to code your own REXX to perform the copies. Sure there are plenty of examples on the forum.
Suggest that you DO NOT use REXX as the copy vehicle but invoke ICEGENER or some other utility to perform the copies.
Also suggest that you do this by submitting to batch rather than locking your terminal for what may be hours.
Or of course if they are all DASD datasets you could do it far quicker and easier using DFdss dump / restore. HRECALL any migrated datasets, dump and restore using rename. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Another approach is to use ISPF services. LMDLIST can be used to build a list of data sets that match your pattern. LMCOPY can then be used to copy the data set.
(As usual, I have left out a lot of details, some of them very important. With a bit of research the TS should be able to figure it out). |
|
Back to top |
|
|
Paul Voyner
New User
Joined: 26 Nov 2012 Posts: 52 Location: UK
|
|
|
|
I did something similar a while back. Assuming you have DFDSS or FDR ..
1. Do a TYPRUN=NORUN dump or copy to get a list of all your eligible XMMD01.DEVL.BR10.J* datasets
2. Process that SYSPRINT in a REXX to generate RENUNC(olddsn,newdsn) statements for each datasets
3. Use the statements from (2) as SYSIN to a DFDSS COPY job.
(Because DFDSS generic rename processing can't handle changing the number of dsn levels, which is what you seem to want) |
|
Back to top |
|
|
|