Questions on conversion of EBCDIC to ASCII
i am sending a message to an AS400 system. the system will repond in turn with a message that includes 2 sections, header info (for message validation) and the actual response info. in the reponse info i am expecting back 2 bytes of data. these 2 bytes represent 16 items. each bit refers to whether an item is a special reprice item or not. they are representing the bits from high to low (so item 1 is bit 15, item 15 is bit 0)
the header info sent back every time is correct.
we are noticing a stark problem when reading these 2 bytes from the response section. for example we send up a request to check 1 item, we expect back a hex
0x8000=1000 0000 0000 0000
but instead recieve ASCII
0xF800=1111 1000 0000 0000
which in EBCIDIC is
0xEE00=1110 1110 0000 0000
some combination of items do come back with the right bit values set, but there are consistent inconsistencies that keep coming up. the only thing we could come to terms with was that hex 0x8000 in EBCDIC does not have an ASCII equivalent and so is somehow being casted to another value through some process not known to us. im just wondering if any1 out there has seen something similar or knows if this is true. when receiving data from an AS400 (or any other EBCDIC machine), to a PC, if there is no ASCII equivalent, there is some algorithm or default used instead?