IBM 5251 Series Maintenance Information Manual page 193

Display station
Table of Contents

Advertisement

SELF-CHECK FEATURE
Self-Check is a feature of the host system and is
included here only for reference. The Self-Check feature
provides a way for the system to check the entry of
data in fields that contain a precomputed self-check
digit. The self-check digit is the last digit in the field
and has been precomputed by either of two algorithms:
modulus 10 or modulus 11.
Signed numeric, alpha only, numeric only, and
alphameric fields can be specified for checkina. All data
is checked. The four low order bits are used when they
are in the 0 through 9 range. If the four low order
bits are in the A through F range, they are replaced
by O. Characters such as nulls or blanks are also
treated as Os.
Example:
Four Low
Number
EBCDIC
Order
Used to
Represen-
Bits Are
Compute
Character
tation
Equal To
Check Digit
0
1111 0000
0
0
1
1111 0001
1
5
1111 0101
5
5
8
11111000
8
8
A
1100 0001
1
1
C
1100 0011
3
3
X
1110 0111
7
7
%
0110 1100
C
0
0110 1011
B
0
Computing the Self-Check Digit
Modulus 10
Modulus 10 can be computed for any field that is from
2 to 31 characters long. To compute the modulus 10
check digit, do the following:
1.
Multiply the units position of the field (not the
check digit) by 2. Multiply the tens position of the
field by 1. Proceed to the high order position of
the field; multiply alternately by 2 and 1.
Appendix B. Self-Check Feature
2.
Add the digits of the products.
3.
Subtract the sum of the digits from the next
higher number ending in O.
The difference is the self-check digit.
Note: If the difference is 0, the self-check digit is
O.
If
the difference is 1, the character combination used in
the self-check field has no check digit. Ensure that this
character combination is not used in a self-check field.
Example:
Self-check field
Multiplier
Product
Sum of the digits
Next higher number
ending in 0
Subtract the sum of
the digits
Self-check digit
Self-check field with
check digit
Modulus 11
AF12765
2 1 2
1
212
2 6 2 2 146 10
2+6+2+2+1+4+6+1+0=24
30
30-24=6
6
AF127656
Modulus 11 can be computed for any field that is from
2 to 31 characters long. To compute the modulus 11
check digit, do the following:
1.
Assign a multiplier to each position of the field.
Starting in the units position (not the check digit
position) and proceeding to the high order position
of the field, the multipliers are
~
a4,
~6,7,2,~4, ~6,7,etc.
2.
Multiply each character by its assigned multiplier.
3.
Add the products.
4.
Divide the sum of the products by 11.
5.
Subtract the remainder from 11.
The difference is the self-check digit.
Appendix 8. Self-Check Feature
5251 MIM
8-1

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

5251-15251-11

Table of Contents