Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to calculate the IBAN digit control 1

Status
Not open for further replies.

pepmarti

Programmer
Apr 2, 2001
31
0
0
ES

entidad = "4545"
oficina = "4545"
dc = "30"
compte = "4545454545"

*** donde 1428 es el de españa
*** devuelve un nº si es < 0 hay que añadir &quot;0&quot;

iban = entidad+oficina
mod_1 = mod(val(iban),97)
iban = &quot;&quot;+alltrim(str(mod_1))+dc+substr(compte,1,2)
mod_1 = mod(val(iban),97)
iban = &quot;&quot;+alltrim(str(mod_1))+substr(compte,3,10)+&quot;1428&quot;+&quot;00&quot;
mod_iban = mod(val(iban),97)
cc_iban = 98-mod_iban
wait window str(cc_iban)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top