data base files

1150 pts.
How are the negative values in the packed fields are stored in the PF? How to enter negative data in those fields?

Answer Wiki

Thanks. We'll let you know when a new response is added.


The negatives are stored with a sign in the rightmost position of the field – the sign is normally a letter and is dependent upon the rightmost digit in the value. This sounds more confusing than it is and you don’t really need to know too much about it in practice.

To enter negative values in packed fields you could use DFU or SQL or any other data entry tool and just enter the value as a normal negative – the system will handle the packing and unpacking for you.


Martin Gilbert.


Expanding Martin explanation, to store a packed field the format in hex for number 12345 will be:

For -12345 it will be :

Well, the last byte (‘5D’) will represent character ‘)’ but if you put this negative number in screen it will be displayed like :
because system will convert hex ‘12345D’ to hex ‘F1F2F3F4D5’ and ‘D5’ is letter ‘N’


To expand on Wilson’s answer… in his example it will only
display an N if you display the value with without consideration
for the sign. use a display field that allows for negative numbers
and you can display ‘-12345’.


Discuss This Question: 4  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ten2008
    Hi thanks for the feed back. But i still have a doubt. When i tried to enter a negative value into a packed field in a PF (like -1234.56) the keyboard is getting locked for entering - sign. Please explain how to avoid this. thanks again Ram
    1,150 pointsBadges:
  • WilsonAlano
    Hi Ram, To allow enter a sing in a DSPF you must use a "keyboard shift" 'S' or 'Y' if you will use an edit code or edit word. The minus sign must be entered after the number. 1234.45- Regards Wilson
    2,710 pointsBadges:
  • LBurkett99
    Enter your number (ie., 1234.45), then use the Field Minus key. I use Client Access, and the default for this key is the minus key on the 10-key pad. Having done this the field will display with a non-numeric character in the right-most position of the field, but will show as 1234.45- when re-displayed on the screen. Leo Burkett
    850 pointsBadges:
  • Yorkshireman
    Ignore the sign at the bit level. If you use DFU or any editor, it will transalte, as Leo says. If you're editing the PF at byte level, then check the manuals for the character map or write yourself a byte dump and understand which bit is the sign bit in the field. A character 'D' for instance is merely a 5 with its sign bit set to negative, ditto for A, B etc. F indicates all bits set, which is taken as positive. I forget the other defaults for 1110, 1100 1101 etc - Mainly - just use an editor and let the compilers take the strain..
    6,085 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: