View previous topic :: View next topic |
Author |
Message |
bala3527 Beginner
Joined: 15 Aug 2006 Posts: 2 Topics: 1
|
Posted: Wed Oct 27, 2010 12:30 pm Post subject: Unicode Issue in DB-COBOL |
|
|
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 |
|
Back to top |
|
 |
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Wed Oct 27, 2010 2:05 pm Post subject: |
|
|
Quote: | URGENT - Unicode Issue in DB-COBOL |
A free forum is not the place for "urgent". . .
On how many forums do you plan on posting this same question  |
|
Back to top |
|
 |
bala3527 Beginner
Joined: 15 Aug 2006 Posts: 2 Topics: 1
|
Posted: Thu Oct 28, 2010 1:45 am Post subject: |
|
|
I would better expect an answer instead of posting comments on my question. Forums are meant to help others.Not to comment on the intentions. Hope you got it |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Oct 28, 2010 2:58 am Post subject: |
|
|
bala3527,
after your remark, how many (helpful) responses do you expect?
also, a google search for:
host variables for unicode db2 sql
returned this: DECLARE VARIABLE
are you including the CCSID clause? _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Thu Oct 28, 2010 12:58 pm Post subject: |
|
|
Quote: | I would better expect an answer instead of posting comments on my question | Change your expectations. . .
Oh, i have it. . .
And it is most likely that you don't now and possibly never will.
Your post on the other forum is being locked and if this happens again, posting will be blocked there. |
|
Back to top |
|
 |
|
|