Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Not able to insert square brackets – [] into a db2 column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Not able to insert square brackets – [] into a db2 column
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Tue May 25, 2010 12:27 pm    Post subject: Reply to: Not able to insert square brackets – [] into a d
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Tue May 25, 2010 4:43 pm    Post subject:
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

Site Director


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

PostPosted: Tue May 25, 2010 10:07 pm    Post subject:
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Tue May 25, 2010 10:51 pm    Post subject:
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    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 How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us