bala3527
New User
Joined: 15 Aug 2006 Posts: 1
|
|
|
|
Hi, We have a problem in using Unicode encoding in our application which I have given below.
The Unicode DB2 tables of our application has data types like Char, Varchar, Small Int, Date, timestamp, etc.
Our Cobol Stored Procedures receive Input data from web in UTF-8. Linkage section is defined as PIC X / PIC 9.
The Input parameters passed via linkage are converted to UTF-16 by using "Move Function National-OF (Input field, 1208) to WS-VAR-N" where WS-VAR-N is a working storage variable defined as PIC N.
This WS-VAR-N is used down the line in all the COBOL verbs like UNSTRING, COMPUTE, INSPECT, and MOVE.
It is used in the Where Clause of the SELECT statement, Value clause of the INSERT statement and the SET clause of the UPDATE statements according to the module logic
Issues we face:
1) For UNSTRING statement, if we use Delimited by ", " , it is throwing an error that it has both National and Non-national data items , So we had modified it to be " Delimited by LIT-COMMA " where LIT-COMMA is defined as PIC N with value clause ", " . Our compile was successful but we are still not sure whether this is correct or not.
2) If we use PIC N field in where clause of the SQL statement, we are getting an INCOMPATIBLE OPERANDS FOR COMPARISON OPERATOR "="
3) If we use PIC N field to Insert / Update data we get the error INSERTS OR UPDATES COLUMN 'WITH INCOMPATIBLE DATA
Any help on how the Host variable needs to be defined to handle the Unicode Db2 tables would be great
Thanks....Bala |
|