Problem Description:
Problem occurs when doing a modulus 10 check on ID Numbers.
I have ID numbers (eg: 1999999999999 and 9999999999999), and the month and day is calculated as 99 and 99 respectively. The problem occurs in the alogrithm.
I have inserted a step: If sum (EvenTot + OddTot) >= 99 Then IdAlgoX = -1; this is to say it is invalid, however the error message still appears??
Can anyone help pls...
/*Fields for valid date testing*/
month = input(substr(temp,3,2),2.);
day = input(substr(temp,5,2),2.);
/*Fields for Modulus 10 check*/;
OddTot= Sum(input(Substr(temp, 1,1),1.),
input(Substr(temp, 3,1),1.),
input(Substr(temp, 5,1),1.),
input(Substr(temp, 7,1),1.),
input(Substr(temp, 9,1),1.),
input(Substr(temp,11,1),1.));
EvenTot=Sum(input(Substr(Put(input(Substr(temp, 2,1),1.)*2,z2.),1,1),1.), /* Two1 */
input(Substr(Put(input(Substr(temp, 2,1),1.)*2,z2.),2,1),1.), /* Two2 */
input(Substr(Put(input(Substr(temp, 4,1),1.)*2,z2.),1,1),1.), /* Fou1 */
input(Substr(Put(input(Substr(temp, 4,1),1.)*2,z2.),2,1),1.), /* Fou2 */
input(Substr(Put(input(Substr(temp, 6,1),1.)*2,z2.),1,1),1.), /* Six1 */
input(Substr(Put(input(Substr(temp, 6,1),1.)*2,z2.),2,1),1.), /* Six2 */
input(Substr(Put(input(Substr(temp, 8,1),1.)*2,z2.),1,1),1.), /* Eig1 */
input(Substr(Put(input(Substr(temp, 8,1),1.)*2,z2.),2,1),1.), /* Eig2 */
input(Substr(Put(input(Substr(temp,10,1),1.)*2,z2.),1,1),1.), /* Ten1 */
input(Substr(Put(input(Substr(temp,10,1),1.)*2,z2.),2,1),1.), /* Ten2 */
input(Substr(Put(input(Substr(temp,12,1),1.)*2,z2.),1,1),1.), /* Twe1 */
input(Substr(Put(input(Substr(temp,12,1),1.)*2,z2.),2,1),1.)); /* Twe2 */
IdAlgoX=10-input(Substr(Put(Sum(EvenTot,OddTot),z2.),2,1),1.);
If sum (EvenTot + OddTot) >= 99 Then IdAlgoX = -1;
IdAlgoY=input(Substr(temp,13,1),1.);
If IdAlgoX = 10 then IdAlgoX = 0;