CHECK DIGIT CALCULATION [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation
HP Data Entry and Forms Management System (VPLUS/V)
Appendix C CHECK DIGIT CALCULATION
Check digits are digits added to the end of a value that contains only
numbers (0-9) or letters of the alphabet (A-Z). A FORMSPEC option can be
selected that causes a modulus check to be made on a value entered at the
terminal.
Whenever a value is entered for which check-digit verification has been
specified, a modulus calculation is performed. The result of a modulus
calculation is a single digit that must match the last digit (the "check
digit") of the entered value. If the match is not successful, an error
is diagnosed. Note that for modulus checks to be meaningful, the last
digit verified by such a check must have been calculated by the same
method used for the check.
REFSPEC has an option that lets you add a check digit to an entered
value. The check digit is added when REFORMAT is run. Thus, the check
digit is added after the value is entered at the terminal but before it
is input to the application program. In this case, the modulus
calculation is made programmatically.
The modulus calculations used by VPLUS/V are either modulus 10 or modulus
11. A value is checked by one or the other of these calculations,
depending on which was used to add the check digit. Thus, a value whose
check digit was added using modulus 10 can be checked only by modulus 10;
and a value with a modulus 11 check digit can be checked only with
modulus 11 calculations.
MPE/iX 5.0 Documentation