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
 

 

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: 10256
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: 8057
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: 8057
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
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 6 Sun Nov 06, 2016 8:11 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am


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