Long ago, in a galaxy far away, the were things called Holerith cards. They had 12 rows labeled 12, 11, 0,...9, and 80 columns. The characters 0-9 had a single punch in the respective row. Rows 11 and 12 were none as the zone, except for character where zero was part of the zone.
For decimal numbers no zone and 12 zone were positive and 11 zone was negative. Depending of the application, the sign might either be on the first digit or the last. When S/360 came along, IBM assigned the code points for EBCDIC based on the zone and digits used to represent each character. For alphanumeric data they used 4 bits for the zone and 4 bits for the digit, with C for 12-zone, D for 11-zone, E for 12-11-zone and F for no zone. IBM also had ASCII-8, based on an ANSI draft that was never adopted, but that disappeared with S/370. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Discussion List on behalf of Phil Smith III Sent: Monday, April 28, 2025 12:16 PM To: [email protected] Subject: Packed decimal sign nibbles External Message: Use Caution A friend asked me about packed decimal sign nibbles, specifically x'0F'. I said "Unsigned" was what I'd always been told. He said he was finding varied answers, and then pointed me at SA22-7832-03 (PofOp, but an old version from 2004) where, on page 8-2 (PDF page 1150) is the following table. It displays correctly in monospace font, so hopefully you can read it: Recognized As Code (Binary) Digit Sign -------- ------- ------- 0000 0 Invalid 0001 1 Invalid 0010 2 Invalid 0011 3 Invalid 0100 4 Invalid 0101 5 Invalid 0110 6 Invalid 0111 7 Invalid 1000 8 Invalid 1001 9 Invalid 1010 Invalid Plus 1011 Invalid Minus 1100 Invalid Plus (preferred) 1101 Invalid Minus (preferred) 1110 Invalid Plus 1111 Invalid Plus (zone) X'0A'? X'0B'?? X'0E'??? I'd only ever heard of x'0C', x'0D', and sometimes x'0F'. Is it just me? I certainly don't claim to be Mr. Packed Decimal, but I have encountered it off and on over the last 45 years, so I was very surprised. I do see the discussion of "zones" in that section of the book, but that doesn't clarify for me because zones have always been a mystery to me--never needed to grok them. And it still doesn't explain the other values. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
