We are scanning Acucobol sources.
When a program contains an array of which the size is defined with a 78-level variable,
the size of the array is not calculated correctly. The value of the OCCURS clause is taken as 1.
When directly using a number in the OCCURS clause there is no problem.
See the example program below:
IDENTIFICATION DIVISION.
PROGRAM-ID. PP0044.
WORKING-STORAGE SECTION.
78 ARRAY-SIZE VALUE 5.
01 ARRAY.
03 ARRAY-ELEMENT PIC X(01) OCCURS ARRAY-SIZE.
PROCEDURE DIVISION.
MAIN SECTION.
MOVE "ABC" TO ARRAY
GOBACK
.
Versions used:
Cobol: Acucobol 10.2.1
SonarQube: * 10.2.1 (build 78527)
SonarScanner 5.0.1.3006
Please fix this FP.