View previous topic :: View next topic
|
Author |
Message |
keane
New User
Joined: 24 Jul 2006 Posts: 11
|
|
|
|
I have a got a requirement to replace one copybook name (one liner code change due to change of version of copybook) in 8000 modules. I am looking for smarter ways (Automation) to complete this single line code change in all modules instead of manually completing these.
Appreciate your quick repsonse |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Rexx is the obvious answer. A HLL with embedded ISPF service calls would work, although it would be significantly more difficult, IMPO. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Why can't the existing copybook be used? I missed that bit. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
IBM's IPOUPDTE, or the slightly improved (doesn't require $$$COIBM) PDSUPDTE
For what it's worth, the change is IMHO totally bogus, why not change the contents of the to-be-replaced copy book? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
prino wrote: |
For what it's worth, the change is IMHO totally bogus, why not change the contents of the to-be-replaced copy book? |
In my shop, the version number is incorporated in the copybook name; thus a new version has a different name, and the name must be changed in all affected modules. (Note that don't say this is a good idea.) |
|
Back to top |
|
|
keane
New User
Joined: 24 Jul 2006 Posts: 11
|
|
|
|
Bill Woodger, prino,
Akatsukami is right!!Version Number is incorporated in the copybook name. So name must be changed in all affected modules.
I am looking for smarter option (which reduce manual efforts) in such away that I could implement the changes in one go and without much manual intervention.
I am new to REXX. So i will need to explore more about this option. If you come across any other options such as using any other utilities or writing one time routines, please do let me know. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Well, it has been said that it is not necessarily a good idea. Has no-one at your site had this problem before? What did they do?
If new to rexx, also check out Prino's suggestions, as you only need control cards for those. |
|
Back to top |
|
|
Paul Voyner
New User
Joined: 26 Nov 2012 Posts: 52 Location: UK
|
|
|
|
This is a fairly simple thing in REXX, but not if you're new to REXX.
If it's a simple 'replace string A with B' then use IPOUPDTE.
Code: |
//STEP EXEC PGM=IPOUPDTE,PARM=UPDATE
//SYSPRINT DD SYSOUT=*
//@TEST DD DISP=SHR,DSN=mylib
//SYSIN DD *
AAAA<XXXX<
/*
|
This will replace AAAA with XXXX in all members in the @TEST lib
Note: Library must have a member called $$$COIBM. Doesn't matter what it contains.
There are more parameters can be used. Google IPOUPDTE + JCL |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
FileManager can do it, so can FileAid.
If you want to reduce future trouble, consider using a two-level copybook:
copybook1 contains
COPY COPYBOOK2
Then, if you need to change that name, just change copybook1
I feel lucky that my predecessors handled almost all 3rd party apps via subroutines with our own interfaces. When we have a 3rd party product change, we just fix the subroutine and we're usually good. |
|
Back to top |
|
|
|