I am trying to load Global Title translations into a Tekelec Eagle STP using a KeyBoard Send & Rx(KSR) connection. I am reading my line ranges in from a text file and then concatenating the begining and the end of the command to the line being read in. If I just read the line in and then just termwrites it back out then I have no problem, it runs through the entire list. When I use strcat to add the rest of the command to the string, the script just repeates the same string over and over. See code below..
proc main
string fname = "verizon.gtt.txt"
; example string "345675"
string LineBuffer
string firsthalf="ent-gtt:type=12:gta="
string
secondhalf=":ri=ssn:ssn=11:xlat=dpcssnc=238-013-012^M"
if fopen 0 fname READ TEXT
while not feof 0
fgets 0 LineBuffer
strcat firsthalf LineBuffer
strcat firsthalf secondhalf
transmit "^A"
waitfor "> "
transmit firsthalf
waitfor "ENT-GTT: PSM B - COMPLTD"
endwhile
else
errormsg "Couldn't open file `"%s`"." Fname
endif
fclose 0
endproc
;I endup with...
;ent-gtt:type=12:gta=345675:ri=ssn:ssn=11:xlat=dpcssnc=238-013-012^M
;over and over and over
Thanks MTSOtech
proc main
string fname = "verizon.gtt.txt"
; example string "345675"
string LineBuffer
string firsthalf="ent-gtt:type=12:gta="
string
secondhalf=":ri=ssn:ssn=11:xlat=dpcssnc=238-013-012^M"
if fopen 0 fname READ TEXT
while not feof 0
fgets 0 LineBuffer
strcat firsthalf LineBuffer
strcat firsthalf secondhalf
transmit "^A"
waitfor "> "
transmit firsthalf
waitfor "ENT-GTT: PSM B - COMPLTD"
endwhile
else
errormsg "Couldn't open file `"%s`"." Fname
endif
fclose 0
endproc
;I endup with...
;ent-gtt:type=12:gta=345675:ri=ssn:ssn=11:xlat=dpcssnc=238-013-012^M
;over and over and over
Thanks MTSOtech