CHECK11


ANSI

 

The CHECK11 operation (which may be abbreviated as CK11) performs a modulo 11 check digit calculation on two strings. The instruction uses the following format:

 

 

[label]

CHECK11

{base}{sep}{weight}[,{digit}]

 

Where:

label

Optional. A Program Execution Label.

base

Required. A Character String Variable that contains the base number and the check digit.

sep

Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.

weight

Required. A Character String Variable or string Literal that contains the weighing factor.

digit

Optional. A Character String Variable that contains the calculated check digit that is returned.

Flags Affected: OVER, ZERO

Note the following:

  1. If {digit} is specified, it must be separated from {weight} by a comma.

  2. {base} and {weight} remain unchanged.

  3. If either variable is null or contain non-digits the Logical Length of the base number is not equal to the Logical Length + 1 of the weighing factor, the OVER Condition Flag is set and the EQUAL Condition Flag is cleared. If {digit} was specified, it is blank filled.

  4. If the check digit computes, the EQUAL Condition Flag is set. Otherwise, the OVER Condition Flag is set. In either case, if {digit} was specified, it contains the correct check digit.

  5. A computed check digit of 10 or greater cannot be used. It sets the OVER Condition Flag and blank fills {digit} if specified.

  6. Lateral addition computes the check digit.

 

 

See Also: Example Code, CHECK10, Mathematical Instructions

 



PL/B Language Reference CHECK10 COMPARE