I want to copy a load module from one pds to another using REXX.
How can I copy load module using rexx?
662 Views Asked by monkey At
3
There are 3 best solutions below
0
On
Using just REXX what you want to do is not possible, however, you can invoke IEBCOPY (or your site equivalent) to perform the task for you. You may want to investigate calling programs like IEBCOPY and passing it the appropriate control cards to perform your task.
0
On
You could invoke IEBCOPY from within a Rexx, allocating the appropriate datasets to the appropriate ddnames before invoking IEBCOPY.
I'm unable to provide an example as I don't have the facilities/access.
Note that doing so may tie up your terminal/session.
You could also go into a more elaborate solution to build and submit a batch job, perhaps even having a panel front end, driving file tailoring/skeletons.
As @cshneid said you can use IEBCOPY Using IEBCOPY in rexx is basically the same as in JCL but:
if running under ISPF you can use LMCOPY. Roughly the following should work, you may need to issue a LMOPEN / LMClose on the data-ids as well ???
If running foreground, the ISPF services used to have the advantage as they "co-ordinated" there actions with all other ISPF users- Less likely to corrupt the PDS directory. Not sure if this is an advantage any more.