Parse error with Function TRIM statement

Hi,
We are working with SonarQube Server Version 6.7.2 (build 37468).
The SonarCOBOL Plugin has version 4.4.

Parsing a COBOL source results in a parsing error. The piece of code is:
MOVE FUNCTION TRIM (W90-INTEGER, LEADING)
TO NtrySeqNr IN EntryInfo
OF W99-PRC-BOOKG01-RPLY

The parsing error:
Parse error at line 586: 574: ENTRYINFO 575: OF W99-PRC-BOOKG01-RPLY 577: MOVE NTRY-SEQ-NB IN NATB592-IND 578: TO NTRYSEQNR-IND IN ENTRYINFO 579: OF W99-PRC-BOOKG01-RPLY 581: IF NTRY-SEQ-NB IN NATB592-IND 582: NOT NEGATIVE 584: MOVE NTRY-SEQ-NB IN DCLNATB592 585: TO W90-INTEGER-R 586: MOVE FUNCTION TRIM ( W90-INTEGER LEADING ) ^ 587: TO NTRYSEQNR IN ENTRYINFO 588: OF W99-PRC-BOOKG01-RPLY 589: END-IF 591: MOVE BOOKG-DT-TM-GMT IN NATB592-IND 592: TO BOOKGDTTMGMT-IND IN ENTRYINFO 593: OF W99-PRC-BOOKG01-RPLY 594: MOVE BOOKG-DT-TM-GMT IN DCLNATB592 595: TO BOOKGDTTMGMT IN ENTRYINFO 596: OF W99-PRC-BOOKG01-RPLY 598

Is this problem known? If so, when is a solution planned?
If it is not known, can you have a look and provide feedback?

Thanks!

Best regards,
Henk van der Wijk

Hi,

What’s your COBOL compiler?
What’s the value you set for sonar.cobol.dialect?

Thanks,
Pierre-Yves

Hi,
We use Enterprise COBOL 6.2.
I have been searching but cannot figure out where the sonar.cobol.dialect is set. Can you help me how to find that parameter?

Thanks,
Henk

sonar.cobol.dialect can be set in the project or global administration, in the “COBOL” tab. It can also be set in the sonar-project.properties file.
The default value is ibm-enterprise-cobol, which should be fine for you.

The problem you face is indeed linked to the TRIM function.
I created SONARCOBOL-1547 to track this issue.

Thanks a lot for your feedback!
Pierre-Yves

Hi Pierre-Yves,

Thanks for your fast replies!
We are looking forward to the solution within a future release of the plugin.

Cheers,
Henk

Hi Pierre-Yves,
How are you doing?
Do you have any update for this issue? Developers are asking for the solution.
An update is highly appreciated.
Merci,
Henk

Hi Henk,
Sorry, I don’t have any update.
We should definitely fix this issue and we should do it “soon” but I cannot give any estimate.
Pierre-Yves

Hello Pierre-Yves,
I hope you are doing well in these difficult times.
Is there anything to report about this issue? It is becoming a more popular feature for the developers, but with a failing parser the rest of the Sonar messages are not visible.
It would be very handy to have it fixed.’
Can you deliver me good news? :smiley:

Thanks!
Take care and stay healthy,
Henk van der Wijk

Hey Henk!

This issue is fixed and available in SonarQube v8.4.

Hi Colin, Thank you. That is good news! I will ask our support team to upgrade to this version.
Cheers,
Henk