infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
MOD10 TCL PROC?
System
Originally posted by Anonymous
Does anyone have a MOD10 tcl that they would like to share? I need to add the check digit back to the doctor before it enters the hospital system...
Thanks in advance! Mary
Find more posts tagged with
Clovertech
Comments
Steve Drozdowski
Here is a snippet of code that should work:
proc checkdigit { no } {
set pos [string length $no]
set t ""
foreach i [split $no ""] {
incr pos -1
append t [expr $i * (2 - $pos % 2)]
}
set result [expr (10 - [cross_sum $t] % 10) % 10]
}
proc cross_sum { s } { expr [join [split $s ""] "+"] }
HTH!