Skip to main content

SQL statement in Unicode variable

  • February 1, 2017
  • 1 reply
  • 0 views

Hi,

please is possible to have SQL statement in PIC N variable? I need this because in WHERE condition I have variable with Chinese characters, and I am worried, if I try to convert it, I will loose these chars. Because computer on this program runs have English locale.

Is there any solution for such a case?

Thanks.


#COBOL
#SQL
#unicode

1 reply

Chris Glazier
Forum|alt.badge.img+2

Hi,

please is possible to have SQL statement in PIC N variable? I need this because in WHERE condition I have variable with Chinese characters, and I am worried, if I try to convert it, I will loose these chars. Because computer on this program runs have English locale.

Is there any solution for such a case?

Thanks.


#COBOL
#SQL
#unicode
What database are you accessing and what embedded SQL technology are you using?
If you are using OpenESQL to access your database through ODBC then you can define your host variables as PIC N data-types and they will be treated as Unicode.