Astounding, I totally agree with you and I believe that your numeric example should be working, but it doesn't. This is my exact code (latest I've tried). DEVNR is type=num len=5 format=HEX4: IF PUT(DEVNR,HEX4.) = 06X THEN DEVTYPE='V'; ELSE DEVTYPE='P'; My education/training tells me that the actual DEVNR field should look like '06EA0F', a 3 byte length field. When I list the variable, it shows a 4 numeric ( I assume) length field in the listing. Is SAS maybe padding this field with zeros? Is it NOT storing it as a true HEX compressed field? Or am I totally way off base here?
... View more