View previous topic :: View next topic
|
Author |
Message |
GaganGarg
Active User
Joined: 31 Mar 2010 Posts: 134 Location: India
|
|
|
|
Hi,
I am trying to insert square brackets – [] into a db2 column that has datatype char. Insertion returns sql code as 0 and the insertion is successful. But it in the table square brackets are inserted as dots. What could be the reason for this.Is it that square brackets don’t comply with char datatype in db2??
Thanks |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Actually it is hard to believe...
show us datatype of column and your insert query(if you are doing this though cobol-db2 program then population of hos variable also...) |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
square, curly brackets, vertical bar ( continuos vs. split )
have always been a pain in the ***
check ( have Your support ) all You can about code pages and terminal translation tables...
look at the data in hex and check again
maybe it' s only Your terminal unable to display it! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
What could be the reason for this.Is it that square brackets don’t comply with char datatype in db2?? |
No, the problem is that square brackets do NOT have a standard representation in EBCDIC. Depending upon the code page used, they can be different characters. And what one code page handles as a square bracket, another code page may handle as a dot (i.e., undefined value). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you look at the value in HEX to see what was really inserted. . .
Here is what my systems shows:
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Here's my system:
the characters on the mainframe emulator show as square brackets. |
|
Back to top |
|
|
|