MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unicode Issue in DB-COBOL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
bala3527
Beginner


Joined: 15 Aug 2006
Posts: 2
Topics: 1

PostPosted: Wed Oct 27, 2010 12:30 pm    Post subject: Unicode Issue in DB-COBOL Reply with quote

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
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Wed Oct 27, 2010 2:05 pm    Post subject: Reply with quote

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 Sad
Back to top
View user's profile Send private message
bala3527
Beginner


Joined: 15 Aug 2006
Posts: 2
Topics: 1

PostPosted: Thu Oct 28, 2010 1:45 am    Post subject: Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Oct 28, 2010 2:58 am    Post subject: Reply with quote

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
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Thu Oct 28, 2010 12:58 pm    Post subject: Reply with quote

Quote:
I would better expect an answer instead of posting comments on my question
Change your expectations. . .


Quote:
Hope you got it
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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group