Errors migrating from Netexpress 5.1 to Visual Cobol 2.3

Hi,

Getting errors during compile time. The same code worked in Net Express 5.1 but having issues in Visual Cobol 2.3

Error 6 COBCH0302 : IF....ELSE or scope-delimiter mismatch

COBES0112 : S-QNM-QUEUE-CODE-DB should not be defined with an OCCURS clause

Anyone encountered similar issues?

Thank for your help

Ramesh

  • Can you show what the full syntax in that statement is and what compiler directives you are using? How did you bring the NX code over to Visual COBOL, through the conversion wizard or using a manual process?

  • Hi Chris,s, 

    I have attached the source file. We have errors at line number 937 and 980.

    We are using NetExpress 5.1 with Visual Studio. So I copied .cblproj file to new environment and opened with Visual Cobol, it converted the project.

    SQL(DBMAN=ADO) SQL(TARGETDB=ORACLE), these are the 2 directives I am using.

    Thanks Chris

    Ramesh

  • Hi Chris,s, 

    I have attached the source file. We have errors at line number 937 and 980.

    We are using NetExpress 5.1 with Visual Studio. So I copied .cblproj file to new environment and opened with Visual Cobol, it converted the project.

    SQL(DBMAN=ADO) SQL(TARGETDB=ORACLE), these are the 2 directives I am using.

    Thanks Chris

    Ramesh

  • Hi Chris,

    ========================

              EXEC SQL WHENEVER NOT FOUND CONTINUE END-EXEC.

              IF SELQUEUE-1-OPEN

                  EXEC SQL FETCH SELQUEUE_1 INTO

                    :I-KCT-ID-DB :NULLIND

                   ,:S-QNM-QUEUE-CODE-DB :NULLIND

                   ,:I-VZD-ID-DB :NULLIND

                   ,:S-QUE-FSS-STATUS-DB :NULLIND

    =============================

    We are using NetExpress 5.1 with Visual Studio. So I copied .cblproj file to new environment and opened with Visual Cobol, it converted the project.

    SQL(DBMAN=ADO) SQL(TARGETDB=ORACLE), these are the 2 directives I am using.

    Thanks Chris

    Ramesh

  • Thank you. Can you also show me how the host variables are defined in your program?

  • Hi Chris,

          01  STRBUFF             PIC X(30).      

          01  WS-FETCH-CNT        PIC 9(08).

          01  WS-SQLCODE-OUD      PIC S9(9) COMP.

          01  WS-IX               PIC 9(03).

         *KM044-START

         *01  WS-MAX              PIC 9(03) VALUE 55.

          01  WS-MAX              PIC 9(03) VALUE 110.

         *KM044-END

          01  WS-HLPMAX           PIC 9(03).

          01  PC-FLD.

              03  PC-FLDNAM       PIC X(32).

              03  PC-FLDVAL       PIC X(80).

          01  DB-FLDNAM           PIC X(32).

          01  PC-SELVAL           PIC X(80).

          01  DB-WHRAND           PIC X(06).

          01  DB-EQL              PIC X(06).

          01  DB-SELLEN           PIC S9(04) COMP.

          01  WS-LEN              PIC 9(04).

          01  WS-SELQUEUE-1       PIC X.

              88 SELQUEUE-1-OPEN  VALUE "J".

              88 SELQUEUE-1-DICHT VALUE "N".

          01  WS-SELQUEUE-2       PIC X.

              88 SELQUEUE-2-OPEN  VALUE "J".

              88 SELQUEUE-2-DICHT VALUE "N".

          01  WS-DEBUG-MODE                PIC 9(1).

              88 WS-DEBUG-UIT              VALUE 0.

              88 WS-DEBUG-AAN              VALUE 1.

              EXEC SQL BEGIN DECLARE SECTION END-EXEC.

          01  DB-SELSTMT                   PIC X(620).

          01  nullind-array.

         * Array 1 groter dan ws-max i.v.m. maxexeed

         *     03  NULLIND                  OCCURS 56 PIC S9(4) COMP.

               03  NULLIND                      PIC S9(4) COMP.

          01  WS-QUR-VZD-ID                PIC X(10).

          01  WS-QUE-DATUM-VAN             PIC X(14).

          01  WS-QUE-DATUM-TEM             PIC X(14).

          01  WS-QUE-DATUM-WENS-VAN        PIC X(14).

          01  WS-QUE-DATUM-WENS-TEM        PIC X(14).

          01  WS-KCT-INSTAL-IND            PIC X(01).

          01  WS-KCT-INFRA-IND             PIC X(01).

          01  WS-KCT-CONTRACT-IND          PIC X(01).

          01  WS-KCT-OVR-INFRA-IND         PIC X(01).

          01  WS-KCT-RANDAPP-IND           PIC X(01).

          01  WS-KCT-BELETSEL-IND          PIC X(01).

          01  WS-UITV-NA-WENS-IND          PIC X(01).

          01  WS-QUE-DATUM-WENS            PIC X(08).

          01  WS-KCT-ID                    PIC X(10).

         *Rel27: Extra column in WFM for Afsluiter : Start

          01  WS-QUE-DATUM-UITV            PIC X(08).

         *Rel27: Extra column in WFM for Afsluiter : End

         *REL27: WFM change foe WorkFlow - Start

          01  WS-QUE-TREFWOORD             PIC X(040).    

         *SI361-Start

         *KM007-START

         *01  I-KCT-ID-VAN-IN1             PIC X(010).

         *01  I-KCT-ID-TEM-IN1             PIC X(010).    

         *01  WS-COUNT                     PIC 9(02).

         *01  WS-LENGTH                    PIC 9(02).

         *01  WS-ACTUAL                    PIC 9(02).

         *KM007-END

         *SI361-End

          01  DAT-DB.

         * Array 1 groter dan ws-max i.v.m. maxexeed

              02  I-KCT-ID-DB OCCURS 111 PIC X(010).

              02  I-VZD-ID-DB OCCURS 111 PIC X(010).

              02  I-QUE-VZD-ID-VK-DB OCCURS 111 PIC X(010).

              02  S-VZD-NAAM-VK-DB OCCURS 111 PIC X(030).

              02  I-QUE-VZD-ID-UITV-DB OCCURS 111 PIC X(010).

              02  S-VZD-NAAM-UITV-DB OCCURS 111 PIC X(030).

              02  S-QNM-QUEUE-CODE-DB OCCURS 111 PIC X(002).

              02  S-QUE-FSS-STATUS-DB OCCURS 111 PIC X(006).

              02  D-QUE-MUTATIE-TIJDSTIP-DB OCCURS 111 PIC X(014).

              02  S-QUE-MUTATOR-DB OCCURS 111 PIC X(011).

              02  S-QUE-NIEUW-IND-DB OCCURS 111 PIC X(001).

              02  S-QUE-LOCK-IND-DB OCCURS 111 PIC X(001).

              02  S-QUE-LOCK-USERNAME-DB OCCURS 111 PIC X(011).

              02  D-QUE-LOCK-TIJDSTIP-DB OCCURS 111 PIC X(014).

              02  S-KCT-VERKOPER-DB OCCURS 111 PIC X(011).

              02  D-KCT-CREATIE-TIJDSTIP-DB OCCURS 111 PIC X(014).

              02  S-KCT-TREFWOORD-DB OCCURS 111 PIC X(040).

              02  S-QUE-STATUS-OMS-DB OCCURS 111 PIC X(040).

              02  S-QUE-GEBR-NAAM-OPMAAK-DB OCCURS 111 PIC X(070).

              02  S-QUE-GEBR-POSTCODE-DB OCCURS 111 PIC X(006).

              02  S-QUE-GEBR-WOONPLAATS-DB OCCURS 111 PIC X(024).

              02  S-QUE-CONTRACTANT-NAAM-DB OCCURS 111 PIC X(070).

              02  S-QUE-CONTRACTANT-CKRNR-DB OCCURS 111 PIC X(070).

              02  S-FSS-REDEN-DB OCCURS 111 PIC X(030).

              02  S-QUE-VERKOPER-NAAM-DB OCCURS 111 PIC X(040).

              02  D-QUE-DATUM-WENS-DB OCCURS 111 PIC X(008).

              02  S-KCT-INSTAL-IND-DB OCCURS 111 PIC X(001).

              02  S-KCT-INFRA-IND-DB OCCURS 111 PIC X(001).

              02  S-KCT-CONTRACT-IND-DB OCCURS 111 PIC X(001).

              02  S-KCT-OVR-INFRA-IND-DB OCCURS 111 PIC X(001).

              02  S-KCT-RANDAPP-IND-DB OCCURS 111 PIC X(001).

              02  S-KCT-REGIE-IND-DB OCCURS 111 PIC X(001).

              02  S-KCT-BELETSEL-IND-DB OCCURS 111 PIC X(001).

              02  S-UITV-NA-WENS-IND-DB OCCURS 111 PIC X(001).

              02  S-QUE-VERK-DOORGESTUURD-DB OCCURS 111 PIC X(040).

              02  S-QUE-IND-FYSIEK-DOC-DB OCCURS 111 PIC X(001).

         *Rel27: Extra column in WFM for Afsluiter : Start

              02  D-QUE-DATUM-UITV-DB OCCURS 111 PIC X(008).

         *Rel27: Extra column in WFM for Afsluiter : End

         *SI361-Start

         *KM007-START    

         *01  WS-X-KCT-ID-TEM-IN           PIC X(01).

         *01  WS-X-KCT-INSTAL-IND-IN       PIC X(01).

         *01  WS-I-KCT-ID-TEM-IN           PIC X(010).

         *01  WS-X-KCT-INFRA-IND-IN        PIC X(01).

         *01  WS-S-KCT-INSTAL-IND-IN       PIC X(01).

         *01  WS-S-KCT-INFRA-IND-IN        PIC X(01).

         *01  WS-X-KCT-CONTRACT-IND-IN     PIC X(01).

         *01  WS-S-KCT-CONTRACT-IND-IN     PIC X(01).

         *01  WS-X-KCT-RANDAPP-IND-IN      PIC X(01).

         *01  WS-S-KCT-RANDAPP-IND-IN      PIC X(01).

         *01  WS-X-KCT-BELETSEL-IND-IN     PIC X(01).

         *01  WS-S-KCT-BELETSEL-IND-IN     PIC X(01).

         *KM007-END  

         *SI361-End

         *    EXEC SQL INCLUDE rec_wfm_queue_rr_db.inc END-EXEC.

              EXEC SQL END DECLARE SECTION END-EXEC.

    Thank You

    Ramesh

  • It appears that you are using a null indicator array that is not actually defined as an array. When you are using host arrays and null indicator arrays both sets of variables have to be defined with an OCCURS with the same number.

    01  nullind-array.

         * Array 1 groter dan ws-max i.v.m. maxexeed

         *     03  NULLIND                  OCCURS 56 PIC S9(4) COMP.

              03  NULLIND                      PIC S9(4) COMP..

    It should be defined as follows:

    01  nullind-array.

         * Array 1 groter dan ws-max i.v.m. maxexeed

         *     03  NULLIND                  OCCURS 56 PIC S9(4) COMP.

              03  NULLIND                      PIC S9(4) COMP occurs 111.

    When I make this change to the sample it compiles fine.

  • Verified Answer

    Hi Chris,

    I made the change as you suggested and it got compiled successfully.

    Thanks a lot.

    Thank you,

    Ramesh

  • Verified Answer

    Hi Chris,

    I made the change as you suggested and it got compiled successfully.

    Thanks a lot.

    Thank you,

    Ramesh