parse_overpunched
- ssapy.io.parse_overpunched(line)[source][source]
Parse and adjust a string containing overpunched numeric values.
This function processes a given string to handle overpunched numeric values, which are a legacy encoding method for representing negative numbers in specific positions. If the first character of the string matches an overpunched value, it is replaced with its corresponding negative numeric value.
- Overpunched values are defined as:
[‘J’, ‘K’, ‘L’, ‘M’, ‘N’, ‘O’, ‘P’, ‘Q’, ‘R’]
The index of the overpunched character determines the numeric value, starting from -1 for ‘J’, -2 for ‘K’, and so on.