Skip to main content

Good evening all, 

Just to give some brief context, I am upgrading our DEV and PROD servers.

The idea is to have them running Visual Cobol 8 and SQL Server 2019.

The problem is that I am having issue with ONE single table regarding accents as we can see below.

Below I will explain what I did and I will show that nothing changed regarding my setup.

1) I cloned and upgraded our DEV server from RHEL7 + SQL Server 2012 + Visual Cobol 4.11 to RHEL8 + SQL Server 2019 + Visual Cobol 8.

2) I verified all the parameters to be sure that they are the same after the update.

What I verified so far:

- the environment variable LANG: on both servers we use en_US

the SQL server collation: on both servers we use SQL_Latin1_General_CP1_CI_AS

the database collation: on both servers we use SQL_Latin1_General_CP850_BIN

In other words I am using the very same config on both servers and I am understanding why I am having issue with accents.

Has anyone here experienced the same situation as I am running out of ideas. 

Thank you in advance.

Best regards,

Thiago


#Linux
#VisualCOBOL
#MicroFocus

Good evening all, 

Just to give some brief context, I am upgrading our DEV and PROD servers.

The idea is to have them running Visual Cobol 8 and SQL Server 2019.

The problem is that I am having issue with ONE single table regarding accents as we can see below.

Below I will explain what I did and I will show that nothing changed regarding my setup.

1) I cloned and upgraded our DEV server from RHEL7 + SQL Server 2012 + Visual Cobol 4.11 to RHEL8 + SQL Server 2019 + Visual Cobol 8.

2) I verified all the parameters to be sure that they are the same after the update.

What I verified so far:

- the environment variable LANG: on both servers we use en_US

the SQL server collation: on both servers we use SQL_Latin1_General_CP1_CI_AS

the database collation: on both servers we use SQL_Latin1_General_CP850_BIN

In other words I am using the very same config on both servers and I am understanding why I am having issue with accents.

Has anyone here experienced the same situation as I am running out of ideas. 

Thank you in advance.

Best regards,

Thiago


#Linux
#VisualCOBOL
#MicroFocus

Hi Thiago,

How did you bring your data over from SQL Server 2012 to SQL Server 2019? Was your COBOL application involved in inserting this data into the database or did you simply do an update or export/import between database versions? I am trying to determine if this is a SQL Server problem or a COBOL one.

You state that this only happens on one table? So in the other tables the accented characters appear correctly? What datatypes are being used to define these columns?


Hi Thiago,

How did you bring your data over from SQL Server 2012 to SQL Server 2019? Was your COBOL application involved in inserting this data into the database or did you simply do an update or export/import between database versions? I am trying to determine if this is a SQL Server problem or a COBOL one.

You state that this only happens on one table? So in the other tables the accented characters appear correctly? What datatypes are being used to define these columns?

Hi Chris, sorry for the lack of information.

The output described above is related to our production chain. 

It is a program cobol that will load the table called COLPY.

We have a bunch of store procs that we use to handle our backups here.

So what I did:

- I restored our backup of 2022-09-19 before production on both servers 

- I ran the entire production chain and compared the results

I did the very same thing on 2019 when I upgrade our infra structure.

That time we were using RHEL5 with net express 5.1 and SQL Server 2005, if i am not mistaken and we did not have issues with accents.

That is the only table where we have it.

As we are in Quebec/Canada, we need to preserve the accents for certain specific french names.

We produce a bunch of files as well with accents on it in order to generate contracts and documents that we send to our customers.

Yesterday I tried to follow what was described here and the results were the same: accented-characters-in-an-html-file-displayed-through-a-cobol-program-are-not-displaying-correctly

Thank you for your reply Chris. 

Best regards,

Thiago


Hi Chris, sorry for the lack of information.

The output described above is related to our production chain. 

It is a program cobol that will load the table called COLPY.

We have a bunch of store procs that we use to handle our backups here.

So what I did:

- I restored our backup of 2022-09-19 before production on both servers 

- I ran the entire production chain and compared the results

I did the very same thing on 2019 when I upgrade our infra structure.

That time we were using RHEL5 with net express 5.1 and SQL Server 2005, if i am not mistaken and we did not have issues with accents.

That is the only table where we have it.

As we are in Quebec/Canada, we need to preserve the accents for certain specific french names.

We produce a bunch of files as well with accents on it in order to generate contracts and documents that we send to our customers.

Yesterday I tried to follow what was described here and the results were the same: accented-characters-in-an-html-file-displayed-through-a-cobol-program-are-not-displaying-correctly

Thank you for your reply Chris. 

Best regards,

Thiago

Hi Chris, 

Yesterday I found out how to use the ODBC Driver trace here and for me it is not related to VC8.

This is what I have on my new server:

[ODBC][521466][1666817908.302813][SQLConnect.c][3721]
		Entry:
			Connection = 0x1c1aeb0
			Server Name = [edbtest][length = 7]
			User Name = [NULL]
			Authentication = [NULL]
		UNICODE Using encoding ASCII 'UTF-8' and UNICODE 'UCS-2LE'

		DIAG [01000] [Easysoft][SQL Server Driver][SQL Server]Changed database context to 'ls_iedbtest'.

		DIAG [01000] [Easysoft][SQL Server Driver][SQL Server]Changed language setting to us_english.

This is what I have on my current server:

[ODBC][6554][1666812350.573990][SQLConnect.c][3700]
		Entry:
			Connection = 0x2862520
			Server Name = [edbtest][length = 7]
			User Name = [NULL]
			Authentication = [NULL]
		UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'

		DIAG [01000] [Easysoft][SQL Server Driver][SQL Server]Changed database context to 'ls_iedbtest'.

		DIAG [01000] [Easysoft][SQL Server Driver][SQL Server]Changed language setting to us_english.

I have different UNICODEs, but the thing is I have no idea where to change this.

I verified so far that:

- I have the same locale on both servers

- the database collation is the same, at the server and database level

In fact I cloned my server and updated Linux, Visual Cobol and the Easysoft ODBC Driver in order to preserve all the setup, but it seems something changed.

I need to dig more into this. 

Thank you very much for your help again.

Take care