Parsing error with Cobol MICROFOCUS Dialect

Issue with Sonar Cobol with a files using MICROFOCUS dialect.

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)

Sonar Cobol : >= 4.3.0.3019
Dialect : MICROFOCUS

  • error observed

Statements that could not compile :

Move LENGTH OF "INTERNAL VALOR #" To TRIM-LEN-17847
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Basically any LENGTH OF with a QUOTED LITERAL.

We are compiling the COBOL with Microfocus compiler without any particular issue.

Hi,

Indeed, our parser wrongly requires LENGTH OF to be followed by a data name even when using Microfocus.
We will fix that: SONARCOBOL-1517

Thanks a lot for the feedback!

Pierre-Yves

1 Like