Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Unicode Issue in DB-COBOL

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> DB2
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    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

dick scherrer

Site Director


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

PostPosted: Thu Oct 28, 2010 11:27 pm    Post subject: Reply to: Unicode Issue in DB-COBOL
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

Site Director


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

PostPosted: Fri Oct 29, 2010 2:22 am    Post subject: Reply to: Unicode Issue in DB-COBOL
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.    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us