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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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