MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compare utility!

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
dsonsamuel
Beginner


Joined: 25 Mar 2004
Posts: 26
Topics: 16

PostPosted: Thu Apr 22, 2004 3:45 am    Post subject: Compare utility! Reply with quote

Hi all,
I have 2 versions of a progm in 2 different datasets.Is there any way to find the new line number if i give an old line number as the input.For example, If I enter 1098,then I must get the new line number which corresponds to 1098 in the old pgm.I think I can use REXX for this.Can u suggest a logic for the same....If I can use anyother utility pls suggest.

Thanks,
Davidson.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Apr 22, 2004 5:39 am    Post subject: Reply with quote

dsonsamuel,

Did your try 3.13 aka SuperC utility?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dsonsamuel
Beginner


Joined: 25 Mar 2004
Posts: 26
Topics: 16

PostPosted: Thu Apr 22, 2004 6:40 am    Post subject: Reply with quote

It gives only the lines that are inserted or deleted.But I want to find the new displacement of a line (that was not changed in the old file).
Back to top
View user's profile Send private message
dsonsamuel
Beginner


Joined: 25 Mar 2004
Posts: 26
Topics: 16

PostPosted: Thu Apr 22, 2004 7:58 am    Post subject: Reply with quote

Ex:

Old pgm
----------
1 AAAA
2 BBBB
3 CCCC
4 DDDD
5 EEEEE
New pgm
------------
1 AAAA
2 CCCC (LINE 2 DELETED)
3 GGGG (NEW LINE INSERTED)
4 DDDD
5 EEEEE

If i give 3 as input,the output should be 2.(Because line 3 has now bcom line 2)
If I give 4 as input, the output should be 4.

Likewise I have to find certain line numbers and their displacements in a pgm which has 90000 lines.(Note: the line number need not be an affected line.Ex: content of line 3 is not changed but its location is changed)

Hope its clear now!!!!
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Fri Apr 23, 2004 6:47 am    Post subject: Reply with quote

You can use REXX & SUPERC together for this purpose.

Step 1: Supply REXX with the line number from the old file, and let it read only this line useing EXECIO. Keep the result line in variable.
Step 2: Generate SYSIN cards for SUPERC SEARCH on the new file, where the search argument is the saved variable from previous step.

If you need a working example, just let me know and I write one for you.

O.
________
M275 engine


Last edited by ofer71 on Sat Feb 05, 2011 11:16 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Fri Apr 23, 2004 11:18 am    Post subject: Reply with quote

What should be the o/p if 2 is the i/p
________
Rolls-Royce Motor Cars


Last edited by coolman on Sat Feb 05, 2011 1:35 am; edited 1 time in total
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Fri Apr 23, 2004 11:10 pm    Post subject: Reply with quote

Probably "0" or "Not Found"
________
vaporizers


Last edited by ofer71 on Sat Feb 05, 2011 11:16 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
dsonsamuel
Beginner


Joined: 25 Mar 2004
Posts: 26
Topics: 16

PostPosted: Tue Apr 27, 2004 4:11 am    Post subject: Reply with quote

Hi,
Sorry yaar for the late response. Thanks for the info. Can u pls send me the a working example. Thanks in advance.


(A problem with the above solution that I foresee is what will happen if the line that we specify as input has got multiple occurance in the program!!!)
Pls suggest....
Dson.
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Wed Apr 28, 2004 12:33 am    Post subject: Reply with quote

Here is my solution.

First, create the following REXX, and name it LOOK4:
Code:
/* REXX */                                                       
                                                                 
ARG LINENUM .                                                   
                                                                 
IF DATATYPE(LINENUM,'W') = 0 THEN                               
  EXIT 16                                                       
                                                                 
ADDRESS TSO "EXECIO 1 DISKR INFILE "LINENUM "(STEM INLINE. FINIS"
                                                                 
OUTLINE.1 = "  SRCHFOR '"STRIP(INLINE.1,"B")"'"                 
OUTLINE.0 = 1                                                   
                                                                 
ADDRESS TSO "EXECIO * DISKW OUTFILE (STEM OUTLINE. FINIS"       
                                                                 
EXIT                                                             
                                                                 


Then, adjust the following job:
Code:
//jobid JOB (),'LOOK FOR',MSGCLASS=X,                   
//    CLASS=S,NOTIFY=&SYSUID,REGION=4096K               
//*                                                     
//REXXEX EXEC PGM=IKJEFT01                               
//SYSPROC  DD DISP=SHR,DSN=rexx.library                 
//INFILE   DD DISP=SHR,DSN=input.dataset                 
//OUTFILE  DD DISP=(,PASS),DSN=&&SYSIN                   
//SYSUDUMP DD SYSOUT=*                                   
//SYSPRINT DD SYSOUT=*                                   
//SYSTSPRT DD SYSOUT=*                                   
//SYSOUT   DD SYSOUT=*                                   
//SYSTSIN  DD *                                         
  %LOOK4 linenum                                         
/*                                                       
//*                                                     
//SCOMP EXEC PGM=ISRSUPC,PARM=(SRCHCMP,'ANYC','NOPRTCC')
//NEWDD   DD DSN=dataset.to.look.in,DISP=SHR             
//OUTDD   DD SYSOUT=*                                   
//SYSIN   DD DSN=&&SYSIN,DISP=(OLD,DELETE,DELETE)       


HTH

O.
________
silversurfer reviews


Last edited by ofer71 on Sat Feb 05, 2011 11:17 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
dsonsamuel
Beginner


Joined: 25 Mar 2004
Posts: 26
Topics: 16

PostPosted: Wed Apr 28, 2004 1:07 am    Post subject: Reply with quote

Thanks a lot for the code.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group