View previous topic :: View next topic
|
Author |
Message |
pdighade
New User
Joined: 21 Jul 2008 Posts: 40 Location: pune
|
|
|
|
Hello,
Suppose I have one cobol pgm in one PDS . Suppose I have made few changes in that program but in separate PDS . Now I want to retrofit these changes in my old PGM . So I have compare these Two separate PDS using SUPERC utility . I got the line nos which are INSRTED and DELETED. Now using Rexx how I should proceed further ? I want to develope a rexx pgm which should take care of these RETROFITING of two cobol PGM automatically instead of doing it manually....
Can I do this using inseted and deleted line no? and How?
The thing is I am doing retrofiting manually several times a day....
I want to find a solution on it... |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Why can't you just promote the entire member... that is, why not copy the member from one PDS to the other? |
|
Back to top |
|
|
pdighade
New User
Joined: 21 Jul 2008 Posts: 40 Location: pune
|
|
|
|
The thing is when changes are huge(or some times project dependent) , at the same time two different resources are updating the same code in two different PDS.
and then I need to retrofit the code after chages are done from both side. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Two people updating the file at the same time?? Seems like an invitation for trouble. I think the library system should prevent the second update until the first is done.
But I am guessing that -you- are the library system. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
I think automating insertions and deletions will be effectively the same as replacing the members.
Instead of SUPERC, I think you should use the COMPARE command that is part of the ISPF Editor. The differences in the two files will be shown in the dataset being edited. Then you can delete the lines you do not want and use MD9999 command to copy in the inserted lines. |
|
Back to top |
|
|
pdighade
New User
Joined: 21 Jul 2008 Posts: 40 Location: pune
|
|
|
|
CAN YOU PLEASE SUGGEST HOW TO USE THESE COMMANDS? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
Back to top |
|
|
pdighade
New User
Joined: 21 Jul 2008 Posts: 40 Location: pune
|
|
|
|
Do you know how to use MD (make dataline) command through rexx |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
I just see a big misunderstanding here or a poor description of the requirements....
if simply two objects are involved why take an update instead of simply copying
for the update path IIRC superc has the option of crating the proper IEBUPDTE statements..
so just run a batchsuperc and afterwards a IEBUPDTE wit the superc generated statements
....
but what I am afraid of is that the TS did not tell everything...
the most probable environment is the parallel updates disease
in this case the on way is to use UNIX tools like diff3
given the environment
source-base
source_updat1
source-updat2
a proper execution of the diff3 utility will yield the updates to be applied
in order to merge the updates and create an object/thing containing both updates |
|
Back to top |
|
|
pdighade
New User
Joined: 21 Jul 2008 Posts: 40 Location: pune
|
|
|
|
I have downloaded the diff3 tool .but it will work for text format only
Do i need to copy the code on notepad to comapre everytime..
Tell me the way how i should proceed with SUPERC ? I think my idea can be implemneted.......... tell me the way how i should identify the lines to be deleted and lines to be inserted at approriate position....It can be duable... |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Quote: |
tell me the way how i should identify the lines to be deleted and lines to be inserted at approriate position |
How do you determine that when you do it manually? I think you have to have an idea of what the author intended. And with two concurrent authors, you have to know what both are doing. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
The thing is I am doing retrofiting manually several times a day....
|
I believe this will cause more problems that it solves. If multiple versions are being worked on at the same time, all this will do is propogate the current untested/unresolved bugs into multiple versions of the source.
Suggest you consider only periodic "merges" of the source - preferably when the developers believe they have reached some stable point for that particular set of code. |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
3 way merge is, or at least should be, always a manual process. You can always make up some rule about what should be kept or not for automated tools, but doing that without human intervention is a recipe for disaster. What if two developers change the same line in different ways? What if one deletes some lines and the other makes changes that depend on those lines that were deleted? You should have a library system that allows one developer to update a master copy and requires additional changers to merge changes after the 1st developer is done making changes. That is called a pessimistic locking strategy. An optimistic strategy (like in CVS and like what you are using) can work with good compare tools, but it is still a painful manual process that is very error prone. What's worse is that there are a lot of compare tools that claim to do automatic merges of nonconflicting changes (like eclipse) that do a terrible job of it. So if you understand the code you are merging, use ISPF compare to compare the base with change set 1, merge changes that you want and then compare to change set 2. But this should be done by developers that made the changes. Anything else will inevitably lead to merge and logic errors. |
|
Back to top |
|
|
|