We are scanning Cobol sources.
When we have a 78-level field in a LINKAGE section we get a remark about a data-value
being used in linkage:
‘A data value clause should not be defined in a linkage section’
However, a 78-level field should not be viewed as a data field. It is a compile-time constant.
Versions used:
Cobol: AcuCobol version 10.2.1, fixed format
SonarQube: Enterprise Edition Version 10.2.1 (build 78527)
Source code example:
IDENTIFICATION DIVISION.
PROGRAM-ID. PP0045.
WORKING-STORAGE SECTION.
LINKAGE SECTION.
01 ARRAY-DEFINITION.
78 ARRAY-SIZE VALUE 5.
03 ARRAY.
05 ARRAY-ELEMENT PIC X(01) OCCURS ARRAY-SIZE.
PROCEDURE DIVISION USING ARRAY-DEFINITION.
MAIN SECTION.
GOBACK
.
We would appreciate a change in the check, so that this is no longer a remark.