IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Unicode Issue in DB-COBOL


IBM Mainframe Forums -> DB2
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
bala3527

New User


Joined: 15 Aug 2006
Posts: 1

PostPosted: Wed Oct 27, 2010 10:56 pm
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
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 28, 2010 11:27 pm
Reply with quote

Topic locked here due to duplicate post on another forum icon_sad.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Oct 29, 2010 2:22 am
Reply with quote

From DBZ (Dick Brenholtz):

Possible cause is not including the CCSID clause.
How to DECLARE VARIABLE for unicode db2 sql
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top