Phil,
I wrote this code to compute a Modulo 11 Check Digits for banking accounts (a
method widely use, al least in Europe):
NC ACCT,=XL16'0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F'
VL V1,ACCT Load vectors: v1=account
VLM V2,V3,COEF Load vectors: v2=coef,v3=zero
VMLB V4,V1,V2 v4=v1*v2
VSUMB V1,V4,V3 v1=v4(b1+b2+b3+b4)(b5+b6+b7+b8)...
VSUMGF V4,V1,V3 v4=v1(f1+f2)(f3+f4)
VSUMQG V1,V4,V3 v1=v4(g1+g2)
VSTEG V1,SUM,1 store 2nd double
LG R1,SUM r1=sum
LLILL R2,11 r2=11
DSGFR R0,R2 divide r0||r1/11
LLILL R1,11 r1=11
SR R1,R0 r1=11-resto
STCM R1,B'0001',RESULT save
TR RESULT,=XL12'F0F1F2F3F4F5F6F7F8F9F1F0'
.....
COEF DC XL16'00000408050A01020408050A09070306'
Regards, salva.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN