Issue with compatibility of older compiled artefacts in .NET / JVM COBOL

Issue with compatibility of older compiled artefacts in .NET / JVM COBOL

Problem:

In Visual COBOL 4.0 and Visual COBOL 5.0, in an extremely small and limited set of cases, there is an issue running older .NET executables and dll, and older JVM .class files. Specifically, for the problem to occur, ALL of the following must be true.

  1. Your application must do an IS NUMERIC condition test on a variable declared with USAGE NATIONAL.
  2. The code being run must have been created with Visual COBOL 3.0 or earlier.
  3. The code must be run using Visual COBOL 4.0 or 5.0.

The problem is that the IS NUMERIC test may give the wrong answer.


Solution:

The resolution is to recompile any program that uses this construct.

In order to resolve this issue fully, in Visual COBOL 6.0 the .NET and JVM COBOL runtimes will reject any program using IS NUMERIC on a NATIONAL item that was compiled with an earlier (i.e. 5.0 or earlier) product, issuing a “missing method” exception. The resolution is to recompile.

For the avoidance of doubt, if a program does not use NATIONAL data, it is completely unaffected by this issue. Furthermore, if a program is compiled and run using the same version of VC there is no problem.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2020-04-23 13:01
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.