Focal Point
Read 2 fexes to find if they are the same

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3321065722

May 11, 2007, 02:36 PM
Mark1
Read 2 fexes to find if they are the same
Wondering if there is a quick fex I can write to pull in two other fexes to see if they are the same or not. Something like:

-MRNOEDIT -INCLUDE FEX1
-SET &VARIABLE1 = READ FEX1
-MRNOEDIT -INCLUDE FEX2
-SET &VARIABLE2 = READ FEX2
-IF &VARIABLE1 EQ &VARIABLE2 THEN TYPE "THEY MATCH!" ELSE TYPE "THEY DON'T MATCH"

Does anybody think this is possible?


Windows version 768
May 11, 2007, 04:03 PM
susannah
well, we get the idea that you want, but the way to do it is to actually read each fex , line by line, as tho each were a data file, and compare line 1 to line 1, etc.
You can write a generic master file for a text file of variable length records, and filedef it to your myfex.fex,
or you can try -READ against each fex, looping by a &KOUNTER and compare the same input lines from each fex, 1 by 1, stopping when you encounter a mismatch.
If this sounds like a route you want to pursue, post back, and one of us will help you further.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
May 11, 2007, 05:03 PM
KevinG
Mark,

I'm sure there is some BIGGER picture thing I'm missing here, but there are wonderful tools like WinMERGE that will perform file comparisons. I'd like to hear more about the context you are wanting to do this in.

Thanks,

kevin


WF 7.6.10 / WIN-AIX
May 14, 2007, 01:30 PM
<Tim Howard_ABCBS>
UltraEdit will also allow you to compare to files. That's what we currently use.
May 14, 2007, 02:02 PM
Mark1
Hello,
Not a bigger picture. I seriously have two fexes that do pretty much the same thing and at first glance appear to contain the same code. And, I think they are both scheduled through ReportCaster. I would like to consolidate that down to one fex.


Windows version 768
May 14, 2007, 02:17 PM
Francis Mariani
I use EditPlus as my text-editor and have configured it to use a Microsoft Windows XP Support Tool called windiff.exe.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server