Skip to main content

Good mornig again. 

we continue with other  kind of errors when compile with visula cobol v7.

In this case the error become when there are EXEC SQL and END-EXEC are in upper case and there is also only 1 space between the words END and DECLARE

The code of the program is :

       identification division.

       program-id. desacomp.

       author. arquitectura.

       date-written. date.

      ******************************************************************

      *              Programa de prueba para fallos de compilacion     *

      ******************************************************************

       environment division.

       configuration section.

       special-names.

          decimal-point is comma.

       input-output section.

 

       working-storage section.

 

           exec sql include tabdes   end-exec.

 

           EXEC SQL BEGIN DECLARE SECTION END-EXEC.

       01  sql-var2               PIC X(120).

           exec sql END DECLARE SECTION

           end-exec.

 

           copy 'cwdesacomp'.

 

       linkage section.

 

       procedure division .

      ********************

               exec sql

                  select  desdes

                    into :sql-var2

                  from tabdes

                    where descod = 'DIV'

                      and desdes [62,62] = '*'

               end-exec

               move sqlcode    to wk-variable2

               if sqlcode= 1

                  move 'OK'    to  wk-variable1

               else

                  move 'KO'    to  wk-variable1

               end-if

                stop run

          .

Code of tabdes  include:

       EXEC SQL BEGIN DECLARE SECTION END-EXEC.

       01 TABDES.

          02 DESCOD        PIC X(3).

          02 DESCLA        PIC X(15).

          02 DESDES        PIC X(186).

       EXEC SQL END DECLARE SECTION END-EXEC.

Code of cwdesacomp copy :

       01  wk-variable1            pic x(2).

       01  wk-variable2            pic 9(4).

Has  anyone had these problems in visual cobol version migration? Any solution other than modifying all sources?

Good mornig again. 

we continue with other  kind of errors when compile with visula cobol v7.

In this case the error become when there are EXEC SQL and END-EXEC are in upper case and there is also only 1 space between the words END and DECLARE

The code of the program is :

       identification division.

       program-id. desacomp.

       author. arquitectura.

       date-written. date.

      ******************************************************************

      *              Programa de prueba para fallos de compilacion     *

      ******************************************************************

       environment division.

       configuration section.

       special-names.

          decimal-point is comma.

       input-output section.

 

       working-storage section.

 

           exec sql include tabdes   end-exec.

 

           EXEC SQL BEGIN DECLARE SECTION END-EXEC.

       01  sql-var2               PIC X(120).

           exec sql END DECLARE SECTION

           end-exec.

 

           copy 'cwdesacomp'.

 

       linkage section.

 

       procedure division .

      ********************

               exec sql

                  select  desdes

                    into :sql-var2

                  from tabdes

                    where descod = 'DIV'

                      and desdes [62,62] = '*'

               end-exec

               move sqlcode    to wk-variable2

               if sqlcode= 1

                  move 'OK'    to  wk-variable1

               else

                  move 'KO'    to  wk-variable1

               end-if

                stop run

          .

Code of tabdes  include:

       EXEC SQL BEGIN DECLARE SECTION END-EXEC.

       01 TABDES.

          02 DESCOD        PIC X(3).

          02 DESCLA        PIC X(15).

          02 DESDES        PIC X(186).

       EXEC SQL END DECLARE SECTION END-EXEC.

Code of cwdesacomp copy :

       01  wk-variable1            pic x(2).

       01  wk-variable2            pic 9(4).

Has  anyone had these problems in visual cobol version migration? Any solution other than modifying all sources?

Good morning.

A couple of questions. (I asked these questions in your previous post as well)

1. Did you change anything besides the COBOL product version such as the OS or the Informix precompiler?

2. Are you using the same compiler and precompiler directives files that you may have been using with V3.0?

3. Are you on the latest Patch Update for 7.0? This would be Patch Update 10?


Good morning.

A couple of questions. (I asked these questions in your previous post as well)

1. Did you change anything besides the COBOL product version such as the OS or the Informix precompiler?

2. Are you using the same compiler and precompiler directives files that you may have been using with V3.0?

3. Are you on the latest Patch Update for 7.0? This would be Patch Update 10?

Hi Chris , as my colleague Albert answered in the other disscusion we have open ,the the scenario is the same and it seams all errors are related with the COBSQL precompiler.

I am reading abaout the CP precompiler because it has some interesting options like EXECPIRIOD, but we has never user it.

What can you say us about the use of this precompiler. Is it possible to use it with informix bbdd?

I think it is possible that some of this errors  can be resolved if we put the CP proprocessor in addition to the COBSQL.

What do you think?

Thk


Hi Chris , as my colleague Albert answered in the other disscusion we have open ,the the scenario is the same and it seams all errors are related with the COBSQL precompiler.

I am reading abaout the CP precompiler because it has some interesting options like EXECPIRIOD, but we has never user it.

What can you say us about the use of this precompiler. Is it possible to use it with informix bbdd?

I think it is possible that some of this errors  can be resolved if we put the CP proprocessor in addition to the COBSQL.

What do you think?

Thk

Yes, you can use the CP preprocessor with Informix and COBSQL but I am not sure it would help in the examples that you have provided. CP is the Copybook Preprocessor which expands all copy and include statements before passing it onto the database proprocessor so that the source code will be processed as a single unit. When I get rid of the INCLUDE and copy in your test program the problem still occurs because of the missing line feed.