var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: convert a column in DB2 table to HEX
I trying to convert a column in DB2 table to its HEX value by executing the following,
select hex(column) from tablename;
my column is of length 52 fields ( means it is varchar(52) ).
the column value contains spaces and it is being converted to 4040404040..40
which actually should convert to 202020202020....20
why is this happening?
Any reference on this would also be of great help.
40 hex is a space in EBCDIC.
Is this db2 for z/os?
Thanks for the reply..
yes db2 z/os.
when i import this file to my PC and when i try to convert it to ascii i am getting wrong values.
How can i convert it to ascii values in my local PC ?
to convert this into ascii char i am using perl script...
Use iconv utility instead.
thanks for the reply mark.
I tried with iconv..
iconv -f ISO8859-10 -t IBM-1046 <file>
but it shows wrong conversion ..
Try this to convert from EBCDIC to ASCII:
iconv -f IBM-1047 -t ISO8859-1 file_ebcdic.txt > file_ascii.txt
Tags for this Thread