Hi
I'm trying to creat a script for adding SCL numbers from a CSV file this the Program:
proc main
string sline, pos,num,numPos
string Name = "file.cap" ; Name of capture file to open.
set capture file Name ; Set name of capture file.
capture on ;Start the capture
TRANSMIT "^M"
TRANSMIT "LD 18^M"
WAITFOR "REQ "
TRANSMIT "CHG^M"
waitfor "TYPE"
transmit "SSC^M"
waitfor "LSNO"
transmit "98^M"
transmit "^M"
transmit "^M"
transmit "^M"
transmit "^M"
set txpace 50
fopen 0 "C:\PC\SCL.csv" read
while not feof 0
fgets 0 sline
strtok pos sline ";" 1 ;Get number position
strtok num sline ";" 1 ;Get number to be write
numPos=" " ;Insert a space
strcat numPos num ;Insert a space before the number
strcat pos numPos ;Add the number to the SSC position
; Transmit the information to PBX
WAITFOR "STOR "
TRANSMIT pos ;Send the Position and the number example 000 92124545
TRANSMIT "^M"
WAITFOR "WRT " ;Confirm thw write
TRANSMIT "YES^M"
endwhile
fclose 0
capture off ; Close the capture file.
endproc
This is the CSV file, first the SSC position the telephonenumber:
000;92324547;s
001;93568745;s
002;92512095;s
003;93542514;s
The posiiton 000 and 001 are writen ok, but the program stuck from postion 002 this the capture (from capture on command):
>LD 18
SCL000
MEM AVAIL: (U/P): 2500278 USED U P: 541292 71389 TOT: 3112959
DISK RECS AVAIL: 896
REQ CHG
TYPE SSC
LSNO 98
NCOS
DNSZ
SIZE
WRT (ADDS: MEM: 0 DISK: 0.0)
STOR 000 92324547
WRT YES
STOR 001 93568745
WRT YES
STOR 002 SCH461
STOR 92512095
SCH461
STOR
Any Idea?
I'm trying to creat a script for adding SCL numbers from a CSV file this the Program:
proc main
string sline, pos,num,numPos
string Name = "file.cap" ; Name of capture file to open.
set capture file Name ; Set name of capture file.
capture on ;Start the capture
TRANSMIT "^M"
TRANSMIT "LD 18^M"
WAITFOR "REQ "
TRANSMIT "CHG^M"
waitfor "TYPE"
transmit "SSC^M"
waitfor "LSNO"
transmit "98^M"
transmit "^M"
transmit "^M"
transmit "^M"
transmit "^M"
set txpace 50
fopen 0 "C:\PC\SCL.csv" read
while not feof 0
fgets 0 sline
strtok pos sline ";" 1 ;Get number position
strtok num sline ";" 1 ;Get number to be write
numPos=" " ;Insert a space
strcat numPos num ;Insert a space before the number
strcat pos numPos ;Add the number to the SSC position
; Transmit the information to PBX
WAITFOR "STOR "
TRANSMIT pos ;Send the Position and the number example 000 92124545
TRANSMIT "^M"
WAITFOR "WRT " ;Confirm thw write
TRANSMIT "YES^M"
endwhile
fclose 0
capture off ; Close the capture file.
endproc
This is the CSV file, first the SSC position the telephonenumber:
000;92324547;s
001;93568745;s
002;92512095;s
003;93542514;s
The posiiton 000 and 001 are writen ok, but the program stuck from postion 002 this the capture (from capture on command):
>LD 18
SCL000
MEM AVAIL: (U/P): 2500278 USED U P: 541292 71389 TOT: 3112959
DISK RECS AVAIL: 896
REQ CHG
TYPE SSC
LSNO 98
NCOS
DNSZ
SIZE
WRT (ADDS: MEM: 0 DISK: 0.0)
STOR 000 92324547
WRT YES
STOR 001 93568745
WRT YES
STOR 002 SCH461
STOR 92512095
SCH461
STOR
Any Idea?