Script to bulk change Nortel telephones
Script to bulk change Nortel telephones
(OP)
I just downloaded ZOC in order to create a script to change multiple telephones on a CS1000 at 7.6
I recorded a script with changing one phone to get the parameters:
I know I will need to create a text file with the specific inputs. The items that will change are:
TYPE and TN
Everything else will remain the same.
Sample of text file might be:
TYPE TN
1230 248 0 0 8
1120 236 0 0 5
3903 4 0 8 10
Does anyone have a sample script to do something similar that they would be willing to share?
Thank you.
I recorded a script with changing one phone to get the parameters:
CODE
/* REXX (RECORDED BY ZOC V7.18.3 2018/05/17 07:03:15) */ CALL ZocTimeout 60 CALL ZocWaitForSeq "on" CALL ZocSend "ld 20^M" CALL ZocWait "REQ:" CALL ZocSend "chg^M" CALL ZocWait "TYPE:" CALL ZocSend "1230^M" CALL ZocWait "TN" CALL ZocSend "248 0 0 8^M" CALL ZocWait "ECHG" CALL ZocSend "yes^M" CALL ZocWait "ITEM" CALL ZocSend "fdn 7000^M" CALL ZocWait "ITEM" CALL ZocSend "hunt 7000^M" CALL ZocWait "ITEM" CALL ZocSend "key 16 mwk 7000^M" CALL ZocWait "KEY" CALL ZocSend "^M" CALL ZocWait "ITEM" CALL ZocSend "^M"
I know I will need to create a text file with the specific inputs. The items that will change are:
TYPE and TN
Everything else will remain the same.
Sample of text file might be:
TYPE TN
1230 248 0 0 8
1120 236 0 0 5
3903 4 0 8 10
Does anyone have a sample script to do something similar that they would be willing to share?
Thank you.
RE: Script to bulk change Nortel telephones
Nic
RE: Script to bulk change Nortel telephones
1230,248 0 0 8
1120,236 0 0 5
3903,4 0 8 10
Going on what you are wanting you could do the following:
CALL ZocTimeout 60
CALL ZocWaitForSeq "on"
new= ZocGetFilename("Select file to upload", "c:\*.csv")
IF new="##CANCEL##" THEN CALL finish
CALL ZocSend "ld 20^M"
CALL ZocWait "REQ:"
DO FOREVER
fileid = linein(new)
PARSE VALUE fileid WITH v1","v2
IF v1 = "" THEN CALL finish
CALL ZocSend "chg^M"
CALL ZocWait "TYPE:"
CALL ZocSend v1"^M"
CALL ZocWait "TN"
CALL ZocSend v2"^M"
CALL ZocWait "ECHG"
CALL ZocSend "yes^M"
CALL ZocWait "ITEM"
CALL ZocSend "fdn 7000^M"
CALL ZocWait "ITEM"
CALL ZocSend "hunt 7000^M"
CALL ZocWait "ITEM"
CALL ZocSend "key 16 mwk 7000^M"
CALL ZocWait "KEY"
CALL ZocSend "^M"
CALL ZocWait "ITEM"
CALL ZocSend "^M"
CALL ZocWait "REQ:"
END
finish:
CALL ZocSend "****^M"
CALL ZocNotify "Finished"
EXIT
RE: Script to bulk change Nortel telephones
RE: Script to bulk change Nortel telephones
Nic
RE: Script to bulk change Nortel telephones
RE: Script to bulk change Nortel telephones
ZocGetFilename(<title> [, <default>])
Display a file selection window and return the filename. If the file requester is cancelled, the string ##CANCEL## is returned.
Example:
file= ZocGetFilename("Select file to upload", "*.ZIP")
IF file\="##CANCEL##" THEN DO
CALL ZocUpload "ZMODEM", file
END
RE: Script to bulk change Nortel telephones
Nic
RE: Script to bulk change Nortel telephones