Page 1 of 1

Why it is called "zoned"?

Posted: Tue Dec 09, 2014 6:03 pm
by Kedar Afley
Hi,

I have a rather trivial question I think. A PD is called as PD because the way the number is stored in the memory, it is same for binary values too. But why ZD fields are called as zoned decimal. They are "displayable fields" so where the word "zone" came out from?

Re: Why it is called "zoned"?

Posted: Wed Dec 10, 2014 4:28 am
by Robert Sample
The number zero, stored as a one-byte ZD value, has the hexadecimal value 'F0'. The 'F' is called the zone and packed decimal values use the zone for numeric digits. The value 12345 in zoned decimal has the hexadecimal value 'F1F2F3F4F5' while the packed decimal value is '12345F' (for unsigned). The zone is used to determine if the data value is a special character or alphabetic value or numeric value.

Re: Why it is called "zoned"?

Posted: Wed Dec 10, 2014 6:44 pm
by enrico-sorichetti
IIRC the terminology comes from punched cards

punched cards were 80 columns by 12 rows

the lower 10 rows were used for positive numeric chars

for alphabetics, special chars and signed number a over punch in the upper ZONE was used
I wonder why the over punch on row 8 for special chars

probably because of the cabling of tabulating machines and friends
029-card-image.jpg

Re: Why it is called "zoned"?

Posted: Wed Dec 10, 2014 6:57 pm
by Anuj Dhawan
As Enrico has said, the terms "Zone" has been carried forward from when computers used punched cards for input and output. This is an interesting read:
The punched card had eighty vertical columns and twelve horizontal rows. The columns were simply numbered 1-80. The top two rows were numbered "12" and "11". The remaining rows were referred to as rows 0 through 9. The top three rows were referred to as the Zones (the 12, 11 and 0 rows). Rows 1 through 9 were referred to as the Decimal rows (with the 0 (zero) row doing double duty as the decimal 0). When a column contained a single hole (a punch) in a decimal row it was equivalent to a positive digit or number. To create a negative value required a second punch in the column that represented the units position of a numeric field (or data string). For negative numbers this was the eleven row. This solved the problem of storing positive and negative numbers in the limited space available on a punched card but was the beginning of an annoying little problem that still exist today. This little problem can be understood when we take a look at how the alphabet was stored on a punched card. The upper-case, alphabetic characters required two punches in each column that contained a letter. For the letters A-I the twelve-punch was used along with a 1-9 punch. For the letters J-R the eleven-punch was used along with a 1-9 punch. For the letters S-Z the zero-punch was used along with a 2-9 punch. Here is the problem, the punched hole pattern for the letters "J" through "R" are the same as the punched hole pattern for the signed, negative numbers of 1 through 9.