# LOCK MODE '(WITH) MASS-UPDATE' clause in select causes parsing error when parsing AcuCobol src

**URL:** <https://community.sonarsource.com/t/lock-mode-with-mass-update-clause-in-select-causes-parsing-error-when-parsing-acucobol-src/88179>\
**Category:** SonarQube Server / Community Build\
**Tags:** parse-error, cobol, sonarqube\
**Created:** [March 28, 2023, 2:04pm UTC](https://community.sonarsource.com/t/lock-mode-with-mass-update-clause-in-select-causes-parsing-error-when-parsing-acucobol-src/88179 "2023-03-28T14:04:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jos\_Abrahams](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jos_abrahams/32/43608_2.png) [@Jos\_Abrahams](https://community.sonarsource.com/u/Jos_Abrahams)\
**Post date:** [March 28, 2023, 2:04pm UTC](https://community.sonarsource.com/t/lock-mode-with-mass-update-clause-in-select-causes-parsing-error-when-parsing-acucobol-src/88179/1 "2023-03-28T14:04:44Z")

</div>

We are trying to parse Cobol sources.

Having a SELECT with ‘MASS-UPDATE’ clause causes the parser to fail, while the compiler has no problems with it.

Versions used:  
Cobol: AcuCobol version 10.2.1, fixed format  
SonarQube: Enterprise Edition Version 9.6.1 (build 59531)

– extract from the parser logging –

```auto
ERROR: Unable to parse COBOL source file : /build/builds/_NwxSV3v/0/dataserver-utilities/tdeltaplayground/sonar-parse-errors/cobol-src/source/PP0021 at line 9

Original contents starting from line 1 till line 19:
       IDENTIFICATION DIVISION.
       PROGRAM-ID. PP0021.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT INT-FILE ASSIGN TO RANDOM INT-FILE-NAME
                  ORGANIZATION IS LINE SEQUENTIAL
      * The (WITH) MASS-UPDATE clause causes the parser to
      * fail:
                  LOCK MODE IS EXCLUSIVE WITH MASS-UPDATE
                  FILE STATUS IS FILE-STATUS.
       DATA DIVISION.
       FILE SECTION.
       FD INT-FILE.
       01 INT-REC PIC X(80).
       WORKING-STORAGE SECTION.
       01 INT-FILE-NAME PIC X(80).
       01 FILE-STATUS PIC 9(02).
       PROCEDURE DIVISION.
           GOBACK.

Preprocessed contents: 
Parse error at line 9:

    1: IDENTIFICATION DIVISION .
    2: PROGRAM-ID . PP0021 .
    3: INPUT-OUTPUT SECTION .
    4: FILE-CONTROL .
    5: SELECT INT-FILE ASSIGN TO RANDOM INT-FILE-NAME
    6: ORGANIZATION IS LINE SEQUENTIAL
    9: LOCK MODE IS EXCLUSIVE WITH MASS-UPDATE
                                   ^
   10: FILE STATUS IS FILE-STATUS .
   11: DATA DIVISION .
   12: FILE SECTION .
   13: FD INT-FILE .
   14: 01 INT-REC PIC X ( 80 ) .
   15: WORKING-STORAGE SECTION .
   16: 01 INT-FILE-NAME PIC X

```

We would like you to fix this issue.

---

<div class="post-metadata">

**Author:** ![pynicolas](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/pynicolas/32/675_2.png) [@pynicolas](https://community.sonarsource.com/u/pynicolas)\
**Post date:** [March 30, 2023, 4:01pm UTC](https://community.sonarsource.com/t/lock-mode-with-mass-update-clause-in-select-causes-parsing-error-when-parsing-acucobol-src/88179/4 "2023-03-30T16:01:31Z")

</div>

Indeed, it’s AcuCOBOL-specific and we should fix this parsing error.  
I created a ticket to track it: [SONARCOBOL-1650](https://sonarsource.atlassian.net/browse/SONARCOBOL-1650)  
Thank you!
