Signed overpunch

From Wikipedia, the free encyclopedia

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 not explicit in the text. Using numbers with two decimal digits:

1000} is -100.00

References

This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.