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

Not able to insert square brackets – [] into a db2 column


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Tue May 25, 2010 11:04 am
Reply with quote

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

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue May 25, 2010 11:46 am
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue May 25, 2010 12:27 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue May 25, 2010 4:43 pm
Reply with quote

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

Moderator Emeritus


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

PostPosted: Tue May 25, 2010 10:07 pm
Reply with quote

Hello,

Suggest you look at the value in HEX to see what was really inserted. . .

Here is what my systems shows:
Code:
 [ ]
4B4B4
0A0B0
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue May 25, 2010 10:51 pm
Reply with quote

Here's my system:
Code:
 Ž
 AB4444
 DD0000
the characters on the mainframe emulator show as square brackets.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts first column truncated in search result IBM Tools 13
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
Search our Forums:

Back to Top