Hello,

I'm trying to solve a unique issue. We are in the middle of a conversion from Datacom to DB2. Somewhere along the line, somebody decided it would be good to take the fields that are defined in our COBOL copybooks as COMP-3 and put them in a DB2 field defined as VARCHAR. When I try to run a Select against these fields, I get back the Hex representation which is unreadable. When I encapsulate the field in the HEX () function, I get back data such as 9331F, with the 'F' indicating the EBCDIC representation of the field. It should be 9331. I can substring the 'F' out, but that seems like a jerry-rigged solution. Is there a way to CAST the inconsistent datatypes so that I get the data back in the correct format.

Thanks....