if {![exists -proc findhsvc]} { require rsv.class proc findhsvc {channel} { global rsvdb set hsvc [$rsvdb query " select hSvc from channel.TBL_SVC where szSvcName = '$channel' or szSvcname = '\025$channel' limit 1 "] if {[llength $hsvc] == 1} { return [lindex [lindex $hsvc 0] 1] } else { return 0 } } proc findhsvcbylcn {lcn} { global rsvdb set hsvc [$rsvdb query " select hSvc from channel.TBL_SVC where usLcn = $lcn limit 1 "] if {[llength $hsvc] == 1} { return [lindex [lindex $hsvc 0] 1] } else { return 0 } } }