I am haveing an issue with the output of termmsg. My goal is to assign logical names to route lists in my switch. The problem I am haveing is the "][" at the begining of each line as seen below.
][DSC 2221
][FLEN 0
][DSP LSC
][Unassigned RAN
][NPA
][NXX
][DSC 2222
][FLEN 0
][DSP LSC
][Unassigned RAN
][NPA
][NXX
][DSC 2223
][FLEN 0
][DSP LSC
][Unassigned RAN
][NPA
][NXX
][DSC 2224
][FLEN 4
][DSP LSC
][Poway
][NPA
][NXX
Here is the code:
proc main
while 1
when target 0 "^M" call lpnum
endwhile
endproc
proc lpnum
string DataVal
set aspect RXDATA ON
while 1
while $RXDATA
rget DataVal
strreplace DataVal "RLI 7" "Unassigned RAN"
strreplace DataVal "RLI 12" "Poway"
strreplace DataVal "RLI 20" "Site 16"
strreplace DataVal "RLI 16" "Site 9"
strreplace DataVal "RLI 22" "Site 23"
strreplace DataVal "RLI 18" "Bldg 90"
strreplace DataVal "RLI 27" "Site 1"
strreplace DataVal "RLI 23" "Bldg 87"
;strreplace DataVal "`n" " "
;strreplace DataVal "^M" " "
strreplace DataVal "][" " "
strreplace DataVal "`f" " "
strreplace DataVal "`t" " "
strreplace DataVal "`v" " "
strreplace DataVal "`b" " "
termmsg "[%s]" DataVal
;endif
endwhile
endwhile
endproc
Any help would be appreciated
Thanks
][DSC 2221
][FLEN 0
][DSP LSC
][Unassigned RAN
][NPA
][NXX
][DSC 2222
][FLEN 0
][DSP LSC
][Unassigned RAN
][NPA
][NXX
][DSC 2223
][FLEN 0
][DSP LSC
][Unassigned RAN
][NPA
][NXX
][DSC 2224
][FLEN 4
][DSP LSC
][Poway
][NPA
][NXX
Here is the code:
proc main
while 1
when target 0 "^M" call lpnum
endwhile
endproc
proc lpnum
string DataVal
set aspect RXDATA ON
while 1
while $RXDATA
rget DataVal
strreplace DataVal "RLI 7" "Unassigned RAN"
strreplace DataVal "RLI 12" "Poway"
strreplace DataVal "RLI 20" "Site 16"
strreplace DataVal "RLI 16" "Site 9"
strreplace DataVal "RLI 22" "Site 23"
strreplace DataVal "RLI 18" "Bldg 90"
strreplace DataVal "RLI 27" "Site 1"
strreplace DataVal "RLI 23" "Bldg 87"
;strreplace DataVal "`n" " "
;strreplace DataVal "^M" " "
strreplace DataVal "][" " "
strreplace DataVal "`f" " "
strreplace DataVal "`t" " "
strreplace DataVal "`v" " "
strreplace DataVal "`b" " "
termmsg "[%s]" DataVal
;endif
endwhile
endwhile
endproc
Any help would be appreciated
Thanks