Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

rexx tool to compare source code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Mon Jul 28, 2014 1:29 pm    Post subject: rexx tool to compare source code
Reply with quote

I want to develop a tool using rexx which will compare the Test version with Production version of Same program and merge the code automatically in the test program if any unmatch found. can anyone give some idea on this ?
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Mon Jul 28, 2014 1:41 pm    Post subject: Reply to: rexx toll to compare source code
Reply with quote

Why that? icon_question.gif
Assuming that the production program is the original, and the test program is the modified version, "merging" as you explain it merely consist in restoring the original.
For this, you can simply do "DEL ALL NX" followed by "COPY prod-member"

Alternatively, you can edit the test version, do a "COMPARE prod-member X" and look at the differences.
You can then easily delete added lines or restore deleted ones.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Jul 28, 2014 1:42 pm    Post subject: Reply to: rexx toll to compare source code
Reply with quote

why reinvent the wheel ...

read about ALL the capabilities of ISPF SUPERC
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Mon Jul 28, 2014 5:03 pm    Post subject:
Reply with quote

Ok for SUPERC, but it depends of the ambition of the project

For source code ( in a language or another ) , for me:

Code:
if zonea = zoneb then

equals to
Code:
if   zonea     =  zoneb     then

or even to
Code:
if zonea = zoneb    ,
then
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Mon Jul 28, 2014 5:25 pm    Post subject: Reply to: rexx toll to compare source code
Reply with quote

Actually in our case, when someone changes moved to production, its the responsibility of developer to merge his changes if the same program available in other test environment's by other users. so currently we are manually merging the code to keep sync in Production.

will it be possible to develop a Rexx toll , which will run in the Test program to compare with production program and merge the changes in Test Program automatically ..
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Mon Jul 28, 2014 5:27 pm    Post subject:
Reply with quote

small remark : not a Rexx toll but a Rexx tool
Back to top
View user's profile Send private message
don.leahy

Active Member


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

PostPosted: Mon Jul 28, 2014 6:05 pm    Post subject:
Reply with quote

The ISPF Edit COMPARE command is ideal for this. It shows you the code differences as labels and temporary lines. To incorporate a line from the production code, you can use the MD (make data) line command on the temporary line.

COMPARE makes code retrofits fun and easy!

Ok, I am exaggerating about the 'fun' part. But it does make it easy.
icon_cool.gif
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Jul 28, 2014 9:39 pm    Post subject: Reply to: rexx toll to compare source code
Reply with quote

I do not think you explained the scenario well... I imagine it is a case of two different change streams: the development of new line items and service to existing production code. You do not want the defect resolved in release 1 to appear again in release 2.

It is not a case of comparing two files... you want to compare 1) the original source with 2) the service to see what was changed, then you want to determine which of those changes get promoted to 3) the development library. That is three files.

There will be some lines added, some deleted, others reformatted. I do not think you want to 'automatic merge', but rather, you want the developer to merge the code. If you have more than one person involved, you may want to have code reviews along the way. That is where the 'fun' part is.

My experience is that you want to promote the service changes to development soon after they are promoted to production. Otherwise you have the risk of too many service changes at the same time, which makes it hard to do. And it might invalidate your unit testing. And also you have the 'what the heck was I trying to do?' factor... you tend to forget the purpose of some things unless it is fresh in your mind.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Tue Jul 29, 2014 6:17 pm    Post subject: Reply to: rexx tool to compare source code
Reply with quote

janmejay wrote:
Actually in our case, when someone changes moved to production, its the responsibility of developer to merge his changes if the same program available in other test environment's by other users. so currently we are manually merging the code to keep sync in Production.
OK, you are talking about Parallel Development...
That is a different story, and a compare is just not enough...
I would recommend to forget about a "tool" and to start thinking about a "product".

Basics are:
You must have a Baseline: the same production source that is being modified by two different programmers.
When one of the programmers moves his program to prod, you have to build a Delta file (between the baseline and modif #1).
And when the second programmer moves his program, you must apply the Delta file to the program.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us