How should i read the following 3 byte value in a single field.The expected value is 000030
value hex{00 00 30} - binary data
I tried using decimal packed option but its giving me an error. Now if I append a byte hex{0f} at the end , then read it using decimal pack len- 7 its working ... but i dont want to append any thing explicitly. Is there any other way by which i can directly read it.
How to read this packed decimal value
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I didn't realize that this was a PX post - sorry about that. As Ray stated, a hex value would work as this is just a binary representation of the internal format. You could also declare it as a CHAR(3) field and then take the value
Code: Select all
(Seq(In.Col[1,1])*(2**16))+(Seq(In.Col[2,1])*(2**8))+Seq(In.Col[3,1])