Let’s say a customer provides the following documentation describing their barcodes.
In this example we’ll be using a MOD11 check digit. This uses a modulus 11 check digit with declining weights for verification of accuracy. The formula for verifying the barcode number employs a declining multiplier as follows:
For example, to get the number 1573969 (where the last “9” is the check digit):
(1*7) = 7
(5*6) = 30
(7*5) = 35
(3*4) = 12
(9*3) = 27
(6*2) = 12
So 7 + 30 + 35 + 12 + 27 + 12 = 123.
123 / 11 = 11, remainder 2. Therefore the check digit = 9 (i.e., 11 - 2).
So, let’s say we have a borrower barcode A5/1573969A. The barcode parameters required to describe this particular barcode would be:
Comment | Borrower card |
Enable barcode | Yes |
Leading characters | A5/ |
Strip leading | No |
Trailing characters | A |
Strip trailing | No |
Min. length | 11 |
Max. length | 11 |
Check digit type | $BCD_CDMOD11$-$ |
Check range start position | 4 |
Check range length | 6 |
Check digit start position | 10 |
Check digit length | 1 |
Remove check digit | No |
Pre-processing routine | |
Filter | |
Trim blanks | No |
The leading characters A5/ and trailing character A are used to identify the barcode type leading and trailing characters, and are NOT stripped. The Check range start position/length and Check digit start position/length are required to specify the part of the barcode over which the check digit is calculated.
In this example, the customer wants to use a dash “-”rather than the usual “X” if the check digit is 10. Therefore we’ve specified the Check digit type as $BCD_CDMOD11$-$ rather than BCD_CDMOD11.