View previous topic :: View next topic |
Author |
Message |
mfuser Banned
Joined: 01 Mar 2005 Posts: 105 Topics: 58
|
Posted: Sat Jul 08, 2006 5:21 am Post subject: difference between EBCDIC and HEXADECIMAL for character |
|
|
Members,
I have a column called FIXTYPE CHAR(01) and has a value 'B'.When i try to get the HEX value of FIXTYPE i am getting as
Code: |
SELECT HEX(FIXTYPE) FROM TABLENAME;
|
OUTPUT:
Wheras i am reading a doc for SQL Reference which says
Code: |
Suppose COL_1 is a column with a data type of char(1) and a value of 'B'.
The hexadecimal representation of the letter 'B' is X'42'. HEX(COL_1)
returns a two-character string '42'.
|
Why is that i am not getting as '42' output instead i am getting 'C2'.
In the links provided
APPENDIX1.3.1 EBCDIC collating sequence
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR10/APPENDIX1.3.1?SHELF=&DT=20020920180651&CASE=
APPENDIX1.3.2 US English ASCII code page (ISO 646)
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR10/APPENDIX1.3.2?SHELF=&DT=20020920180651&CASE=
Which link we should refer and how should i check for the letter B the equivalent Hexadecimal value as 42 because there are two links which have letter B which is mentioned.Is it that since Mainframes uses EBCDIC , so we have to consider EBCDIC letter B is equivalent to 'C2' then when should be the case for considering '42'.Please help me understand the basics. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sat Jul 08, 2006 7:57 am Post subject: |
|
|
Was the reference material for an ASCII Platform? |
|
Back to top |
|
 |
videlord Beginner
Joined: 09 Dec 2004 Posts: 147 Topics: 19
|
Posted: Sat Jul 08, 2006 11:38 am Post subject: |
|
|
the hex code value depend on the CCSID of the table definition |
|
Back to top |
|
 |
|
|