Go Back

How Do I Compare Two Window Libraries For Equality?

I am working on implementing a version of SCRIPT that supports scripting from an arbitrarily large input file.

As part of these changes I need to compare my new SCRIPT output to our existing processes.

I have two Window Libraries and I am getting different sizes between them (never a good sign) I am trying to determine how to know what is different.

Is there tooling that can assist me with this?

9 Answers
0   | Posted by Ace Olszowka to UI Toolkit on 10/29/2020 9:27 PM
Steve Ives
Unload them with FCONVERT and do a diff on the two files, or make a hash of the two files and compare that?

10/30/2020 5:53 PM   0  
Ace Olszowka
Any ideas on how to use FCONVERT in this manner?

This threw the following error:
 
"C:\Program Files (x86)\Synergex\SynergyDE\dbl\bin\fconvert.exe" -ii wndlib.eng -or wndlib.txt
%FCONVERT:  Cannot determine record size, add -r <recsiz> before output filename



 

10/30/2020 6:48 PM   0  
Steve Ives

Yea, I'm pretty sure window libraries use variable-length records and also contain binary data. Try using a "counted" output file:

fconvert -ii wndlib.eng -oc wndlib.txt

I THINK that will work, but if not, get back to me and I'll try to come up with something else.

10/30/2020 10:38 PM   0  
Steve Ives
Sudden thought. I'm not sure if Window Libraries have "date compiled" embedded within the data. If so, that's going to be an issue.

10/30/2020 10:40 PM   0  
Steve Ives
Unfortunately, I did some testing and it appears that the exact same content compiled at different times does not produce the same binary results, so there is no way to achieve what you are asking for.

10/30/2020 11:00 PM   0  
Ace Olszowka
Is there anyway to unload this to test equivalency? This really hampers the ability to test for correctness of the compiler in anything beyond a trivial program.

11/2/2020 5:20 PM   0  
Steve Ives
Sorry, I don't believe there is. It turns out that the differences are not as a result of timestamps, but simply as a result of the way things work. The script compiler builds up a "binary image" of each window, and other UI elements, in memory, when complete we simply dump the memory to a record in the Window Library ISAM file. I'm told the differences are based on how memory is allocated, based on the state of the script compiler process at any given point in time. Being binary compatible run to run was never part of the design criteria. The same is more than likely true for most other types of binary output from our tools.

11/3/2020 12:58 AM   0  
Ace Olszowka

> The script compiler builds up a "binary image" of each window, and other UI elements, in memory, when complete we simply dump the memory to a record in the Window Library ISAM file.

WHOA, PLEASE tell me that the memory sections allocated are being cleared PRIOR to this occurring?!?!

 


11/3/2020 2:28 AM   0  
Steve Ives
There is no error here, everything is working great, and as designed. Unfortunately for you, the 1980's design of this particular area of the product does not produce results that are "binary predictable".

11/3/2020 6:11 PM   0  
Please log in to comment or answer this question.