Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REXX LD 88 Scripting

Status
Not open for further replies.

hardybacon

Technical User
Nov 21, 2013
79
0
0
US
Anyone using REXX to ADD \ Delete Auth Codes in a Legacy Nortel PBX? If so, is anyone willing to share their script?

Thank you - Bryan
 
Not auth codes, but almost everything else.

Provide me a print out of adding one auth. code and I will see if I can whip something up for you.
 
Hi Jamie - After we login and go to load 88 it starts with new at the REQ prompt. We use a text file with numbers running vertically to load the matters. Any help would be appreciated or just an example and I can probably go from there. I have no reference experience with REXX.

Thank you - Bryan

>ld 88
AUTH000

MEM AVAIL: (U/P): 39538872 USED U P: 4991331 349666 TOT: 44879869
DISK SPACE NEEDED: 499 KBYTES
REQ new
TYPE aut
CUST 0
SPWD 0000
CODE 654321
SARC no
CLAS 5
CODE 123456
SARC no
CLAS 5
CODE 765432
SARC no
CLAS 5
CODE
 
Try this, Just put all your auth. codes into a codes.txt file in the root of C: drive....

CALL ZocSend "****^M"
CALL ZocDelay 0.5
CALL ZocSend "LD 88^M"

CALL ZocWait "REQ "
CALL ZocDelay 0.5
CALL ZocSend "new^M"
CALL ZocWait "TYPE"
CALL ZocDelay 0.5
CALL ZocSend "aut^M"
CALL ZocWait "CUST"
CALL ZocDelay 0.5
CALL ZocSend "0^M"
CALL ZocWait "SPWD"
CALL ZocDelay 0.5
CALL ZocSend "0000^M"

file = "c:\codes.txt"
do while( lines(file) )
data=LINEIN(file)
Parse Var data v1

CALL ZocWait "CODE"
CALL ZocDelay 0.5
CALL ZocSend v1
CALL ZocSend "^M"
CALL ZocWait "SARC"
CALL ZocDelay 0.5
CALL ZocSend "no^M"
CALL ZocWait "CLAS"
CALL ZocDelay 0.5
CALL ZocSend "5^M"

END
 
Since I do not use auth codes, I tested it on NXX's and it worked... Here is that too if you want it.

CALL ZocSend "****^M"
CALL ZocDelay 0.5
CALL ZocSend "LD 90^M"

CALL ZocWait "REQ "
CALL ZocSend "new^M"
CALL ZocWait "CUST "
CALL ZocSend "0^M"
CALL ZocWait "FEAT"
CALL ZocSend "net^M"
CALL ZocWait "TRAN"
CALL ZocSend "ac1^M"
CALL ZocWait "TYPE"
CALL ZocSend "nxx^M"

file = "c:\nxx.txt"
do while( lines(file) )
data=LINEIN(file)
Parse Var data v1

CALL ZocWait "NXX"
CALL ZocSend v1
CALL ZocSend "^M"
CALL ZocWait "RLI"
CALL ZocSend "0^M"
CALL ZocWait "SDRR"
CALL ZocSend "^M"
CALL ZocWait "ITEI"
CALL ZocSend "^M"

END
 
Thank you Jamie. It works great. I just have to figure out if it hits a snag like when a code is already in. I'll give a go. Thanks again - Bryan
 
you can use the ZocWaitMux something like this

file = "c:\codes.txt"
LOOP:
data=LINEIN(file)
Parse Var data v1
IF v1 = "" THEN CALL finish

CALL ZocWait "CODE"
CALL ZocDelay 0.5
CALL ZocSend v1
CALL ZocSend "^M"

v2 = ZocWaitMux("CODE", "SARC")
SELECT
WHEN v2=0 THEN CALL LOOP
WHEN v4=1 THEN NEXT
WHEN v4=640 THEN CALL finish
END

NEXT:
CALL ZocDelay 0.5
CALL ZocSend "no^M"
CALL ZocWait "CLAS"
CALL ZocDelay 0.5
CALL ZocSend "5^M"
CALL LOOP

finish:
CALL ZocSend "^M
 
BigNose, what is setting the variable for v4
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top