IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Smarter way to replace copybook name in 8000 modules


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
keane

New User


Joined: 24 Jul 2006
Posts: 11

PostPosted: Thu Jun 26, 2014 11:23 pm
Reply with quote

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

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Jun 26, 2014 11:53 pm
Reply with quote

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jun 27, 2014 12:08 am
Reply with quote

Why can't the existing copybook be used? I missed that bit.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Jun 27, 2014 12:11 am
Reply with quote

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

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Jun 27, 2014 12:45 am
Reply with quote

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

New User


Joined: 24 Jul 2006
Posts: 11

PostPosted: Fri Jun 27, 2014 8:38 am
Reply with quote

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jun 27, 2014 12:05 pm
Reply with quote

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

New User


Joined: 26 Nov 2012
Posts: 52
Location: UK

PostPosted: Fri Jun 27, 2014 12:29 pm
Reply with quote

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

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Jun 27, 2014 6:39 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
No new posts Trying to change copybook in online c... CICS 4
Search our Forums:

Back to Top