Re: The quibble over nibbles (was Re: MVS Packed Decimal with no sign nibble?)

From: Judson McClendon (judmc_at_sunvaley0.com)
Date: 12/04/03


Date: Thu, 4 Dec 2003 07:23:43 -0600


"JerryMouse" <nospam@bisusa.com> wrote:
>
> Presumably, IBM is (was) working with the quaint concept that when you use a
> number you intend to do arithmetic with it.

How does that change the fact that adding a 'sign' that is permanently fixed
to a numeric field is redundant? Is it so hard to accept that an unsigned
numeric field is implicitly positive if used in math? Are computer designers
so obtuse they can't design hardware that does arithmetic without actually
'seeing' an explicit sign? If so, only IBM engineers seem to be so impaired.
When you were in school did they teach that you MUST write '+' beside a
positive number or you could not possibly do arithmetic on it? :-)

> The cases you mentioned,
> telephone number and employee number are not numbers, but names using digits
> as the characters.

Correct, so why should they have a sign? Do you append a sign to your name? ;-)
We use packed decimal fields in these cases purely for storage efficiency,
and that is why COBOL permits you to declare an unsigned numeric field in
the first place. If you don't need the 'S', why would you need the 4 bit 'sign'?

> Remember when telephone numbers used alphabetics? Stick
> those in your packed field! And no, you can't convert "PLaza 2000" to
> numbers, store it, then reconstruct it. Because in another location it might
> be "PLumbo 2000."

You would not use a numeric field to store those, so 'sign' is irrelevant.
That doesn't affect other 'identifying' numeric fields like employee numbers,
part numbers or purely numeric G/L account numbers. There have always
been numeric items that can never be negative or that do not represent scalar
values. All of us have worked on computer systems with lots of fields that
were numeric but could never be negative. Why in the world anyone would
think it necessary to append a fixed 'sign' to each of these is beyond me. Any
'sign' that is permanently fixed is redundant. How can that not be blindingly
obvious to everyone? Are your minds so brainwashed with the IBM mantra
that you cannot think outside that frame of reference? Really now, I know
you folks are far to smart to be confused by this! Admit it, you're just
kidding us, right? :-)

-- 
Judson McClendon      judmc@sunvaley0.com (remove zero)
Sun Valley Systems     http://sunvaley.com
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."


Relevant Pages

  • Re: The quibble over nibbles (was Re: MVS Packed Decimal with no sign nibble?)
    ... So does IBM but you either cannot or will not see it. ... Amdahl's architecture used Read Only Storage to contain the ... I've always considered that a peculiar design 'quirk'. ... > numeric field is implicitly positive if used in math? ...
    (comp.lang.cobol)
  • Re: The quibble over nibbles (was Re: MVS Packed Decimal with no sign nibble?)
    ... you saying that there is a way on IBM mainframes to declare a COBOL ... and did NOT require "extra" storage). ... >> numeric field is implicitly positive if used in math? ...
    (comp.lang.cobol)
  • Re: creating table with datatype smalltime
    ... You can't store this datatype directly into a table. ... and I would do this in a numeric field that has a Single field ... display the the data from seconds into your desired format. ... <MS ACCESS MVP> ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Data type and relationships
    ... store now? ... Is there a reason you can't just add a new field to hold the new text value? ... Will adding a new text value result in redundant data being stored? ... I'm trying to enter text into a numeric field. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: numeric fields
    ... Select the numeric field. ... The integer types can only store whole numbers. ... The format and number of decimal places only affects how the number is ...
    (microsoft.public.access.tablesdbdesign)