IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in

how can we copy the bulk dataset using rexx utility

IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: :: View next topic  
Author Message

New User

Joined: 17 Jun 2010
Posts: 75
Location: Chennai

PostPosted: Tue Nov 04, 2014 11:58 am
Reply with quote

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

Global Moderator

Joined: 14 Mar 2007
Posts: 8794
Location: Welsh Wales

PostPosted: Tue Nov 04, 2014 3:58 pm
Reply with quote

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

Active Member

Joined: 06 Jul 2010
Posts: 692
Location: Whitby, ON, Canada

PostPosted: Wed Nov 05, 2014 3:38 am
Reply with quote

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

New User

Joined: 26 Nov 2012
Posts: 52
Location: UK

PostPosted: Wed Nov 05, 2014 1:02 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> CLIST & REXX
Page 1 of 1


Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Calling Assembler from REXX PL/I & Assembler 5
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
No new posts REXX/CLIST tool for BCSR and EDSR CLIST & REXX 2
No new posts Calling Rexx program from Cobol CLIST & REXX 12
No new posts REXX script to beautify XML CLIST & REXX 1

Back to Top