i have what i assumed was an easy kill script but i cannot get it to work. it continues every message regardless of criteria, can anyone point out where i am messing this up at...code below
#########################################################################################
#########################################################################################
#########################################################################################
# Name: tpsKILL_FRAD_SC
# Purpose: This tps tclproc will KILL status changes from RIS. This is only temporary.
#
#
#
# UPoC type: tps
# Args: tps keyedlist containing the following keys:
# MODE run mode ("start", "run" or "time")
# MSGID message handle
# ARGS user-supplied arguments:
# 1) The user can specify if we are to echo to log
# The key is ECHOON
# ECHOON = YES -> put entry in engine log
# ECHOON = NO -> do not put entry in log (default value)
# ECHOON = anything else -> Default to NO
#
# Example arguments: {ECHOON YES}
#
#
# Returns: tps disposition list:
# Continues the messages as is
# OR
# Errors the message
#
# Created: Kevin Crist 05/1/2014
#
#
#########################################################################################
#########################################################################################
#########################################################################################
proc tpsKILL_FRAD_SC { args } {
#########################################################################################
# Get the Connection/Proc Name for Error/Debug Messages (NOT USED)
#########################################################################################
# global HciConnName
# set myname "$HciConnName/[lindex [info level 1] 0]"
# set nowis [clock format [clock scan now] -format "%D - %T"]
#########################################################################################
# Initialize Variables Used
#########################################################################################
set dispList- ;# Disposition List Returned to Engine
set fldSep "" ;# Field Seperator - get from MSH
set subSep "" ;# SubField Seperator - get from MSH
set repSep "" ;# Repeating Field Seperator - get from MSH
set ORCpos -1 ;# Position of ORC Segment in msg
set ORCList
- ;# ORC Segment Fields in List Form
set ORC_SC 1 ;# Status Change is in field 10
set ORC_Status 5 ;# Type of Status the status change is
#########################################################################################
# Load in the arguments we need that were passed from the caller
#########################################################################################
keylget args MODE mode ;# The mode the engine called from
set echoon "NO" ;# Set to default Value
keylget args ARGS.ECHOON echoon ;# The Engine Log output indicator
set echoon [string toupper $echoon] ;# Use upper case in procedure
#########################################################################################
# Switch based on what mode the engine was in when it called the procedure
#########################################################################################
switch -exact -- $mode {
start { }
run {
set mh [keylget args MSGID] ;# Get message handle from args
set dispList
;# Initialize to good message set msg [msgget $mh] ;# Get a copy of the message set fldSep [string index $msg 3] ;# Field Seperator set subSep [string index $msg 4] ;# Sub-Field Seperator set repSep [string index $msg 5] ;# Repeating Field Seperatorset segList [split $msg r] ;# Split message into segList########################################################################################## Find Position of Segements - If missing -> Error out Message and Return#########################################################################################set ORCpos [lsearch -regexp $segList {^ORC}] ########################################################################################## Split up the Segments into Field Lists######################################################################################### set ORCList [split [lindex $segList $ORCpos] $fldSep] ########################################################################################## Get the and Placer Number#########################################################################################set statusChange [lindex $ORCList $ORC_SC]echo statusChange: $statusChange set scType [lindex $ORCList $ORC_Status]echo scType: $scType##########################################################################################If ORC.1 = SC and ORC.5 = 0 then KILL the message######################################################################################### if {[string equal $statusChange SC] && [string equal $scType 0] } {set dispList
} } time { } shutdown { }} ;# End Switchreturn $dispList} ;# End Proc