- This topic has 1 reply, 2 voices, and was last updated 14 years, 10 months ago by .
-
Topic
-
The following code finds the phone number and fixes. It works fine with one exception, when we have an adt like an A28, or A31 come through, sometimes they dont have much info in them and if the PID segment doesnt fill out to reach the phone number field it errors the message out. How do i fix this so if there is no field it doesnt error it out? Thanks for any thoughts.
set PIDList [split [lindex $segList $PIDpos] $fldSep]
set phone [lindex $PIDList $PIDphone]
if { [string index $phone 0] == “(” } {
set phone [string range $phone 0 12]
} else {
set phone “”
}
lset PIDList $PIDphone $phone
Viewing 0 reply threads
Viewing 0 reply threads
- The forum ‘Tcl Library’ is closed to new topics and replies.