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?