|
You have to tell SAS whether to use the first bit as
part of the value or as a sign flag. Since you want
use it as part of the value, you should use the PIB.
informat rather than the IB. informat when reading
in the value.
-----
1 data _null_;
2
3 testbyte = 'a2'x;
4
5 ib_in = input(testbyte, ib1.);
6 pib_in = input(testbyte, pib1.);
7
8 put ib_in= pib_in=;
9
10 run;
ib_in=-94 pib_in=162
-----
Use the HEX2. format on output.
--
JackHamilton@FirstHealth.com
Development Manager, Technical Group
METRICS Department, First Health
West Sacramento, California USA
>>> Giulio Belrango <giuliobelrango@HOME.COM> 12/04/2000 2:37 PM >>>
I'm working in an IBM mainframe (OS/390) environment. I have a record layout
with hex fields. I want to display them in both, decimal and hexadecimal.
Example
A one character field (FieldA) contains the value 'A2', this is how it is
stored on the file. The value 'A' is in the upper part of the byte and value
'2' in the lower part of the byte. 'A2' is a non printable character.
'A2' is 162 in decimal. I want to print it as A2 and 162.
I used @?? Fielda IB1. this displays the value as -94 which is incorrect. I
also used $HEX1. with no results.
Any help or comments appreciated.
|