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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Target Text

Status
Not open for further replies.

jamie2

Programmer
Jul 26, 2005
1,127
US
I need to be able to target certain text such as "ERR0001" from the console and call a procedure when "ERR0001" is detected.
 
I have trying this with a DO FOREVER and using POS(), but can't get it to work properly.
 
I have been able to do it this way when I know the exact position where the error may appear. In this example the Error is "ESN072". However, I would like to get this into a loop and have it continuously looking for an error.


nxx1=ZocAsk("What NXX would you like to add?")

CALL ZocAutoConnect "(IP) Bldg 2"

CALL ZocDelay 4
CALL ZocSend "^M"
CALL ZocWait ">"
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"
CALL ZocWait "NXX"
CALL ZocSend nxx1
CALL ZocSend "^M"
[red]
Call ZocTimeout .5
timeout= ZocWait("ESN072")
IF timeout=640 THEN
ELSE CALL err1
[/red]
CALL ZocWait "RLI"
CALL ZocSend "0^M"
CALL ZocWait "SDRR"
CALL ZocSend "^M"
CALL ZocWait "ITEI"
CALL ZocSend "^M"
CALL ZocWait "NXX"
CALL ZocSend "^M
 
This is on that Nortel PBX, isn't it?

I wish I understood that platform so I could advise you, but I don't. I feel, however, that looping forever until you detect an error is probably an error in itself. What if the response is that everything is working fine?


Frank Clarke
Support the Troops:
-- Bring them home.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top