reading a hexadecimal as char

UDA
Enthusiast

reading a hexadecimal as char

Hi,
I need to read the file which contains hexadecimal value as characater data and store in a table as in a character column

How can i do that in SQL? I know there is a function in CHAR2HEXINT() which converts from Character to hex..
But how can i convert from hex to char??

i tried

sel 'cola'xc .
but its giving junk values.. shud i need to use FORMAT?? If so wats the default format for Hex???

1 REPLY
Enthusiast

Re: reading a hexadecimal as char

You would have to first find out what is the exact format of the record. whether the characters are represented using ASCII or EBCIDIC , whether there are null indicators for the field etc, etc ...

For all you know, it might be a simple Fast export output in FASTLOAD format (which could appear as hex if open in notepad or do), in which case could be easily use MLOAD to load it into the tables ...

That's why you would have to figure out what's the exact formating of the input record.