validating bank routing #'s
Doug Luurs
doug at borisch.com
Wed Nov 8 13:38:59 PST 2006
> -----Original Message-----
> From:
> filepro-list-bounces+doug=borisch.com at lists.celestial.com
> [mailto:filepro-list-bounces+doug=borisch.com at lists.celestial.
> com] On Behalf Of Walter Vaughan
> Sent: Wednesday, November 08, 2006 4:23 PM
> To: filePro
> Subject: Re: validating bank routing #'s
>
> GCC Consulting wrote:
>
> > Does anyone have a routine available for validating bank
> routing #'s?
> >
> > Richard Kreiss
>
> First strip out any non-numeric characters (like dashes or
> spaces) and make sure
> the resulting string's length is nine digits,
>
> 7 8 9 4 5 6 1 2 4
>
> Then multiply the first digit by 3, the second by 7, the
> third by 1, the fourth
> by 3, the fifth by 7, the sixth by 1, etc., and add them all up.
>
> (7 x 3) + (8 x 7) + (9 x 1) +
> (4 x 3) + (5 x 7) + (6 x 1) +
> (1 x 3) + (2 x 7) + (4 x 1) = 160
>
> If this sum is an integer multiple of 10 (e.g., 10, 20, 30,
> 40, 50,...) then the
> number is valid, as far as the checksum is concerned.
>
> Now, if this were a normal developer community, someone would
> code that in
> filepro and post it here.
>
> --
> Walter
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
* Pretends this is a normal developer community (JUST KIDDING!) *
--
This E-mail, including any attachments, may contain confidential
information and is intended solely for use by the individual to whom
it is addressed. If you received this E-mail in error, please notify
the sender, do not disclose its contents to others, and delete it
from your system. Any other use of this E-mail and/or attachments
is prohibited. This message is not meant to constitute an electronic
signature or intent to contract electronically.
-------------- next part --------------
Field 220 is the Checksum Digit (The 9th digit in the Routing #)
They should match, or *ERROR*.
Set ZZ to the Routing # (9,*)
The few lines that are missing are not needed.
Wlf214a If: '**************************************************************
Then: '*** DFI Routing Number Check Sum
144 ------- - - - - - - - - - - - - - - - -
If: zz eq ""
Then: End
145 ------- - - - - - - - - - - - - - - - -
If:
Then: dim dig[10] (1,*)
147 ------- - - - - - - - - - - - - - - - -
If:
Then: x="1"
148 ------- - - - - - - - - - - - - - - - -
Wlf214b If:
Then: dig[x]=mid(zz,x,"1")
149 ------- - - - - - - - - - - - - - - - -
If: x le "9"
Then: x = x + "1"; Goto Wlf214b
150 ------- - - - - - - - - - - - - - - - -
If:
Then: dim chk[10] (1,.0): ya
151 ------- - - - - - - - - - - - - - - - -
If:
Then: dim cal[10] (3,.0): za
152 ------- - - - - - - - - - - - - - - - -
If: '************************************** DO NOT CHANGE "CV"
Then: cv(8,*)="37137137"; x="1"; qa(5,.0)="0"
153 ------- - - - - - - - - - - - - - - - -
WwfA If:
Then: chk[x] = mid(cv,x,"1"); cal[x] = dig[x] * chk[x]
154 ------- - - - - - - - - - - - - - - - -
If:
Then: qa=qa + cal[x]; x = x + "1"
155 ------- - - - - - - - - - - - - - - - -
If: x le "8"
Then: Goto WwfA
156 ------- - - - - - - - - - - - - - - - -
If:
Then: qb(3,.0)=qa
157 ------- - - - - - - - - - - - - - - - -
If: qb/"10" eq int(qb/"10")
Then: qb=qb+"10"; 220="0"; Goto WwfC
158 ------- - - - - - - - - - - - - - - - -
If:
Then: qb = qb + "1"
159 ------- - - - - - - - - - - - - - - - -
WwfB If: qb / "10" eq int(qb / "10")
Then: 220= qb - qa ; Goto WwfC
160 ------- - - - - - - - - - - - - - - - -
If:
Then: qb = qb + "1"; Goto WwfB
161 ------- - - - - - - - - - - - - - - - -
WwfC If: (qb-qa) eq "10"
Then: 220 = "0"; Display; End
162 ------- - - - - - - - - - - - - - - - -
If: dig["9"] ne (qb - qa)
Then: Goto WwfD
163 ------- - - - - - - - - - - - - - - - -
If:
Then: Display ; End
164 ------- - - - - - - - - - - - - - - - -
WwfD If:
Then: Errorbox "Re-Enter Routing # .. Checksum Error"
166 ------- - - - - - - - - - - - - - - - -
If:
Then: End
More information about the Filepro-list
mailing list