I edited one of John Poole's donated scripts to build I2002 phones and I'm having a couple of problems.
1. it takes around 30 seconds each to grab fields 2,3 & 4
2. it does'nt like the keys after it puts in the cpnd. It gives me sch0030's. Can anyone see what I'm doing wrong.
proc main
string sline, tn,key0,key1,cpnd
fopen 0 "PRI2002.TXT" READ ;Open our data file
while not feof 0 ;While the file still has data
fgets 0 sLine ;Read a line of data
strtok tn sLine "`t" 1 ;Get the first field
strtok key0 sLine "`t" 1 ;Get the second field
strtok key1 sLine "`t" 1 ;Get the third field
strtok cpnd sLine "`t" 1 ;Get the fourth field
; strtok sTemp3 sLine "`t" 1 ;Get the FIFTH field
set txpace 30
transmit "NEW^M"
waitfor "TYPE: "
transmit "I2002^M"
waitfor "TN "
transmit tn
transmit "^M"
waitfor "DES "
transmit "PR^M"
waitfor "CUST "
transmit "0^M"
waitfor "ZONE "
transmit "3^M"
waitfor "FDN "
transmit "^M"
waitfor "TGAR "
transmit "12^M"
waitfor "LDN "
transmit "^M"
waitfor "NCOS "
transmit "4^M"
waitfor "RNPG "
transmit "200^M"
waitfor "SSU "
transmit "^M"
waitfor "SGRP "
transmit "^M"
waitfor "CLS "
transmit "CTD HTA LNA CNDA TDD ARHA IRA FTTU^M"
waitfor "HUNT "
transmit "000^M"
waitfor "LHK "
transmit "1^M"
waitfor "LNRS "
transmit "^M"
waitfor "SCI "
transmit "^M"
waitfor "LPK "
transmit "1^M"
waitfor "PLEV "
transmit "^M"
waitfor "AST "
transmit "^M"
waitfor "IAPG "
transmit "^M"
waitfor "MLWU_LANG "
transmit "^M"
waitfor "DNDR "
transmit "^M"
waitfor "key 0 "
transmit key0
transmit "^M"
waitfor "key "
transmit key1
transmit "^M"
waitfor " CPND "
transmit "NEW^M"
waitfor "name "
transmit cpnd
transmit "^M"
waitfor " XPLN "
transmit "^M"
waitfor " DISPLAY_FMT "
transmit "^M"
waitfor " VMB "
transmit "^M"
waitfor "key "
transmit "2 msb^M"
waitfor "KEY "
transmit "3 nrd^M"
waitfor "KEY "
transmit "^M"
endwhile
fclose 0
endproc
here's the text file
92 0 13 23 0 acd 6020001 0 6620096 1 scr 6120096 PR agent
92 0 13 24 0 acd 6020001 0 6620097 1 scr 6120097 PR agent
92 0 13 25 0 acd 6020001 0 6620098 1 scr 6120098 PR agent
92 0 13 26 0 acd 6020001 0 6620099 1 scr 6120099 PR agent
92 0 13 27 0 acd 6020001 0 6620100 1 scr 6120100 PR agent
after the sch0030's it does complete the phone and start building the next just key 2 and 3 are'nt programmed
this is what I get
HUNT 000
LHK 1
LNRS
SCI
LPK 1
PLEV
AST
IAPG
MLWU_LANG
DNDR
KEY
0 acd 6020001 0 6620096
KEY
AUD000
1 scr 6120096
MARP
CPND NEW
NAME PR agent
XPLN
DISPLAY_FMT
VMB
KEY
2 mSCH0030
sSCH0030
bSCH0030
1. it takes around 30 seconds each to grab fields 2,3 & 4
2. it does'nt like the keys after it puts in the cpnd. It gives me sch0030's. Can anyone see what I'm doing wrong.
proc main
string sline, tn,key0,key1,cpnd
fopen 0 "PRI2002.TXT" READ ;Open our data file
while not feof 0 ;While the file still has data
fgets 0 sLine ;Read a line of data
strtok tn sLine "`t" 1 ;Get the first field
strtok key0 sLine "`t" 1 ;Get the second field
strtok key1 sLine "`t" 1 ;Get the third field
strtok cpnd sLine "`t" 1 ;Get the fourth field
; strtok sTemp3 sLine "`t" 1 ;Get the FIFTH field
set txpace 30
transmit "NEW^M"
waitfor "TYPE: "
transmit "I2002^M"
waitfor "TN "
transmit tn
transmit "^M"
waitfor "DES "
transmit "PR^M"
waitfor "CUST "
transmit "0^M"
waitfor "ZONE "
transmit "3^M"
waitfor "FDN "
transmit "^M"
waitfor "TGAR "
transmit "12^M"
waitfor "LDN "
transmit "^M"
waitfor "NCOS "
transmit "4^M"
waitfor "RNPG "
transmit "200^M"
waitfor "SSU "
transmit "^M"
waitfor "SGRP "
transmit "^M"
waitfor "CLS "
transmit "CTD HTA LNA CNDA TDD ARHA IRA FTTU^M"
waitfor "HUNT "
transmit "000^M"
waitfor "LHK "
transmit "1^M"
waitfor "LNRS "
transmit "^M"
waitfor "SCI "
transmit "^M"
waitfor "LPK "
transmit "1^M"
waitfor "PLEV "
transmit "^M"
waitfor "AST "
transmit "^M"
waitfor "IAPG "
transmit "^M"
waitfor "MLWU_LANG "
transmit "^M"
waitfor "DNDR "
transmit "^M"
waitfor "key 0 "
transmit key0
transmit "^M"
waitfor "key "
transmit key1
transmit "^M"
waitfor " CPND "
transmit "NEW^M"
waitfor "name "
transmit cpnd
transmit "^M"
waitfor " XPLN "
transmit "^M"
waitfor " DISPLAY_FMT "
transmit "^M"
waitfor " VMB "
transmit "^M"
waitfor "key "
transmit "2 msb^M"
waitfor "KEY "
transmit "3 nrd^M"
waitfor "KEY "
transmit "^M"
endwhile
fclose 0
endproc
here's the text file
92 0 13 23 0 acd 6020001 0 6620096 1 scr 6120096 PR agent
92 0 13 24 0 acd 6020001 0 6620097 1 scr 6120097 PR agent
92 0 13 25 0 acd 6020001 0 6620098 1 scr 6120098 PR agent
92 0 13 26 0 acd 6020001 0 6620099 1 scr 6120099 PR agent
92 0 13 27 0 acd 6020001 0 6620100 1 scr 6120100 PR agent
after the sch0030's it does complete the phone and start building the next just key 2 and 3 are'nt programmed
this is what I get
HUNT 000
LHK 1
LNRS
SCI
LPK 1
PLEV
AST
IAPG
MLWU_LANG
DNDR
KEY
0 acd 6020001 0 6620096
KEY
AUD000
1 scr 6120096
MARP
CPND NEW
NAME PR agent
XPLN
DISPLAY_FMT
VMB
KEY
2 mSCH0030
sSCH0030
bSCH0030