openmainframeproject / cobol-check

A testing framework for Cobol applications
Apache License 2.0
78 stars 28 forks source link

Enable usage of linkage section items during tests #306

Open Rune-Christensen opened 1 year ago

Rune-Christensen commented 1 year ago

Currently it is not possible to use linkage section items in the program under test. Unless the test specifically makes the area adressable.

There are issues with just making the areas addressable, by commenting the linkage section statement. The areas in linkage section, could be used in set address to statements, and an area addressed using the procedure division using statement, causes compilation errors.

We suggest a solution where the linkage section is kept as is. If there is a procedure division using statement, that addresses a linkage section area, the procedure statement is commented, and replaced by a generic procedure statement, and the adressed linkage section area, is adressed using the allocate statement.