MyFlight
Technical User
- Feb 4, 2002
- 193
Help I wrote this script to update about 900 Coverage Remote Numbers in an AVAYA. The numbers are not being sent.
proc main
integer iVar, iLen ; Number of entries in dialing class
string sLine, sTok1, sTok2, sTok3, sTok4,sRemote
string sAvayaFile = "Avaya ChaSta.csv"
string sImportPath = "C:\Temp Data Files\Raw Data\"
string sNewPath = "Temp Data Files\Reconfigured Data\"
string sCapPath = "C:\Program Files\Symantec\ProComm Plus\Capture\"
string sSpace = " "
string sRemCmd = "change coverage remote"
chdir sImportPath
isfile sAvayaFile ivar ; Verifies that File does Exist.
if SUCCESS
fopen 1 sAvayaFile READWRITE TEXT ; Opens Text File
pause 2
usermsg "This Script uses a File Called Avaya ChaSta.csv with 4 Colums"
usermsg "The columns are Extension, Cov Path, Cov Rem Num, Rem Entry Num"
usermsg "The Coverage Remote start at entry Number 100"
chdir sNewPath
sdlginput "Remote Path" "Remote:" sRemote
set modem connection current
pause 2
strcat sRemCmd sSpace
strcat sRemCmd sRemote
transmit sRemCmd
mspause 250
transmit "^M"
waitfor "01:" FOREVER
if SUCCESS
transmit "^[OV"
waitfor "46:" FOREVER
if SUCCESS
transmit "^[OV"
waitfor "91:"
if SUCCESS
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "100:" 15
if SUCCESS
while not feof 1
; First Column has a 4-Digit Number
; Second Column has a 3-Digit Number
; Third Colum has a 3-Digit Number
; Fourth Column has a 7-Digit Number witha Dash after the Third Digit
fgets 1 sLine
strlen sLine iLen
strtok sTok1 sLine "," 1 ;Extension Number
strtok sTok2 sLine "," 1 ;Coverage Path
strtok sTok3 sLine "," 1 ;Coverage Remote Entry Number
strtok sTok4 sLine "," 1 ;Remote Number
usermsg "sTok1`"%s`" FOUND." sTok1
usermsg "sTok4`"%s`" FOUND." sTok4
transmit sTok4
mspause 125
transmit "^M"
; The NUmber in Column 4 is not being sent to the system
; Examples of the numbers are: 731-5597, 731-5598, 731-5378
endwhile
transmit "^[OR"
else
; Command aborted
transmit "^[OP"
endif
waitfor "Command successfully completed"
else
; Command aborted
transmit "^[OP"
endif
else
; Command aborted
transmit "^[OP"
endif
else
; Command aborted
transmit "^[OP"
endif
endif
endproc
Any Idea's?
Your suggestions will be most welcome
proc main
integer iVar, iLen ; Number of entries in dialing class
string sLine, sTok1, sTok2, sTok3, sTok4,sRemote
string sAvayaFile = "Avaya ChaSta.csv"
string sImportPath = "C:\Temp Data Files\Raw Data\"
string sNewPath = "Temp Data Files\Reconfigured Data\"
string sCapPath = "C:\Program Files\Symantec\ProComm Plus\Capture\"
string sSpace = " "
string sRemCmd = "change coverage remote"
chdir sImportPath
isfile sAvayaFile ivar ; Verifies that File does Exist.
if SUCCESS
fopen 1 sAvayaFile READWRITE TEXT ; Opens Text File
pause 2
usermsg "This Script uses a File Called Avaya ChaSta.csv with 4 Colums"
usermsg "The columns are Extension, Cov Path, Cov Rem Num, Rem Entry Num"
usermsg "The Coverage Remote start at entry Number 100"
chdir sNewPath
sdlginput "Remote Path" "Remote:" sRemote
set modem connection current
pause 2
strcat sRemCmd sSpace
strcat sRemCmd sRemote
transmit sRemCmd
mspause 250
transmit "^M"
waitfor "01:" FOREVER
if SUCCESS
transmit "^[OV"
waitfor "46:" FOREVER
if SUCCESS
transmit "^[OV"
waitfor "91:"
if SUCCESS
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "^[[4m" FOREVER
transmit "^[[B"
waitfor "100:" 15
if SUCCESS
while not feof 1
; First Column has a 4-Digit Number
; Second Column has a 3-Digit Number
; Third Colum has a 3-Digit Number
; Fourth Column has a 7-Digit Number witha Dash after the Third Digit
fgets 1 sLine
strlen sLine iLen
strtok sTok1 sLine "," 1 ;Extension Number
strtok sTok2 sLine "," 1 ;Coverage Path
strtok sTok3 sLine "," 1 ;Coverage Remote Entry Number
strtok sTok4 sLine "," 1 ;Remote Number
usermsg "sTok1`"%s`" FOUND." sTok1
usermsg "sTok4`"%s`" FOUND." sTok4
transmit sTok4
mspause 125
transmit "^M"
; The NUmber in Column 4 is not being sent to the system
; Examples of the numbers are: 731-5597, 731-5598, 731-5378
endwhile
transmit "^[OR"
else
; Command aborted
transmit "^[OP"
endif
waitfor "Command successfully completed"
else
; Command aborted
transmit "^[OP"
endif
else
; Command aborted
transmit "^[OP"
endif
else
; Command aborted
transmit "^[OP"
endif
endif
endproc
Any Idea's?
Your suggestions will be most welcome