Skip to main content

Problem:

In cases where differing results are observed between the .INT version of a program and the .GNT,Callable shared object, or UNIX executable version of the same program there are a few basic steps to take in identifying the root cause of the difference.

Resolution:

The first thing to do is identify the line of code in the program where the difference can be observed, in most cases this will be an arithmetic operation or possible an evaluation operation (IF , EVALUATE etc).

Make sure that the fields used in the offending statement contain expected values before proceeding, if any element contains an incorrect or unexpected value then the root cause of the difference has not yet been identified, you'll have to work backwards to see where the error is introduced.

Once the offending statement is identified insert some code after the offending statement which will clearly indicate success or failure of the suspect operation. For example if the suspected statment looked like the followng:

multiply item-a by item-b giving item-c.

Insert the following code for use in testing:

If item-c not = expected-value

    display "FAIL"

else

    display "PASS"

end-if.

When the offending statement is an arithmentic operation or a COMPUTE, ensure that the error is not being triggered by a SIZE-ERROR. To do this add a little bit more code to help identify the problem. For example using the same statement as above:

multiply item-a by item-b giving item-c.

Should be modified as follows:

multiply item-a by item -b giving item-c on SIZE-ERROR DISPLAY "SIZE-ERROR".

Now when testing the program if the "SIZE-ERROR" message is displayed, the most likely cause for the difference in results is the fact that there's a problem with the size of the item updated by the calculation, you'll need to make the item larger and eliminate the SIZE-ERROR.

Note adding the ON SIZE-ERROR clause will in many cases make the difference in results disappear, do not be deceived, there is still a problem that needs to be addressed.  If there is no SIZE-ERROR message the chances are that you need to submit a problem report to Micro Focus Support, so that the defect can be addressed, submit the test program containing the PASS/FAIL test (You should omitt the ON SIZE-ERROR clause in the submitted demo)

Old KB# 2305