Compile Issue under ProCOBOL due to SQLBEX

447 views Asked by At

Have been trying to compile an existing Pro*COBOL program after making few changes, have verified the syntax and Non-Printable character which may cause issue for compilation.

But at the end, compilation for Pro*COBOL failing due one of .(dot) appearing under CALL to SQLBEX for the embedded SQL (Line Number 18106 under the listing).

See below code for more details, code snippet has been taken from Pro*COBOL code and the listing generated during compilation.

For other instances where SQLBEX is being called, the .(dot) doesn't appear. Would really appreciate any help.

Code under the listing:

 18085     IF SQLCODE IN SQLCA =   WS-DEADLOCK-WAIT-FOR-RESRC           26825000
 18086        SET DEADLOCK TO TRUE                                      26826000
 18087
 18088*       EXEC SQL                                                  26827000
 18089*           COMMIT                                                26828000
 18090*       END-EXEC
 18091     MOVE 1 TO SQL-ITERS
 18092     MOVE 2914 TO SQL-OFFSET

* Micro Focus COBOL for UNIX         V4.0 revision 004 18-Jan-17 07:31 Page 313
*                      cmcomc23.cob
 18093     MOVE 0 TO SQL-OCCURS
 18094     CALL "SQLADR" USING
 18095         SQLCUD
 18096         SQL-CUD
 18097     CALL "SQLADR" USING
 18098         SQLCA
 18099         SQL-SQLEST
 18100     MOVE 256 TO SQL-SQLETY
 18101
 18102     CALL "SQLBEX" USING
 18103         SQLCTX
 18104         SQLEXD
 18105         SQLFPN
 18106         .
 18107                                                                  26829000
 18108        DISPLAY 'DEAD LOCK OCCURED '                              26829100
 18109        GO TO 9000-EXIT                                           26829200
 18110     ELSE                                                         26829300
* 562-S****************************************************************( 308)**
**    An "ELSE" phrase did not have a matching IF and was discarded.
 18111        SET NO-DEADLOCK TO TRUE                                   26829400
 18112     END-IF.                                                      26829500
* 564-S**********                                                      ( 313)**
**    A scope-delimiter did not have a matching verb and was discarded.

Original Code under Program:

268210******************************************************************26821000
268221 9000-SQL-ERROR      SECTION.                                     26822100
268230******************************************************************26823000
268250     EXEC SQL                                                     26824000
268250        WHENEVER SQLERROR CONTINUE                                26824000
268250     END-EXEC.                                                    26824000
268240                                                                  26824000
268250     IF SQLCODE IN SQLCA =   WS-DEADLOCK-WAIT-FOR-RESRC           26825000
268260        SET DEADLOCK TO TRUE                                      26826000
268270        EXEC SQL                                                  26827000
268280            COMMIT                                                26828000
268290        END-EXEC                                                  26829000
268291        DISPLAY 'DEAD LOCK OCCURED '                              26829100
268292        GO TO 9000-EXIT                                           26829200
268293     ELSE                                                         26829300
268294        SET NO-DEADLOCK TO TRUE                                   26829400
268295     END-IF.                                                      26829500
268296                                                                  26829600
268297     MOVE 'E'        TO WS-ERR-SEVERITY-CD.                       26829700
0

There are 0 answers