Hi all,
I am writing here looking for some guidance.
Recently we updated our DEV server.
Before we were using RHEL7 + Visual Cobol 4.11 + SQL Server 2012.
Now we are using RHEL8 + Visual Cobol 8.0 + SQL Server 2019.
After performing few tests, I found an issue on a SQL Instruction.
On both servers I used the very same data.
The issue is: On RHEL8 + Visual Cobol 8.0 + SQL Server 2019, when reading a cursor for the SECOND time, the fetch instruction reads que same first record, which gives SQLCODE -10000 and SQLSTATE S1010.
We did not change our makefile, we did not touch our code. On our server with visual cobol 4.11 the code works as expected.

Has anyone here have experienced a similar issue when upgrading Visual Cobol?
It is a simple cursor as we can see below
5708 EXEC SQL 5709 DECLARE CC-CURS-STATUT CURSOR FOR 5710 SELECT contenu_carte_controle 5711 ,date_creation_carte_controle 5712 ,id_carte_controle 5713 FROM cartes_controle 5714 WHERE nom_carte_controle = :CC-NOM-CARTE VC 5715 AND SUBSTRING(statut_carte_controle, 1, 9) = VC 5716 SUBSTRING(:CC-STATUT, 1, 9) VC 5717 FOR UPDATE VC 5718 END-EXEC.
5778 EXEC SQL 5779 FETCH CC-CURS-STATUT 5780 INTO :CC-CONTENU, :CC-DATE-CREATION, :CC-ID 5781 END-EXEC
I appreciate any guidance here.
Thank you in advance.
Best regards,
Thiago
#COBOLSQLCOBSQL
#SQL
#VisualCOBOL
#COBOLVISUALCOBOLMIGRATION
#COBOL