Signed overpunch

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

A signed overpunch is a code used to store the sign of a number by changing the last digit. It is used in COBOL, especially when using EBCDIC. Its purpose is to save a character that would otherwise be used by the sign digit.[1] The code is derived from the Hollerith Punched Card Code, where both a digit and a sign can be entered in the same card column.

The codes

Code Digit Sign
} 0
J 1
K 2
L 3
M 4
N 5
O 6
P 7
Q 8
R 9
{ 0 +
A 1 +
B 2 +
C 3 +
D 4 +
E 5 +
F 6 +
G 7 +
H 8 +
I 9 +

Examples

10} is -100
45A is 451

Decimal points are usually implied and not explicitly stated in the text. Using numbers with two decimal digits:

1000} is -100.00

References

  1. Lua error in package.lua at line 80: module 'strict' not found.