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

Capturing error message during Telcom session

Status
Not open for further replies.

jmpurser

Programmer
Nov 19, 2001
12
US
I'm using ProComm/Aspect to enter data into a main frame during a telnet session. One field needs to be unique. When it's not I get an error message and the curser is pulled to the bottom until a return is entered. Then it returns focus to the field that needs to be corrected.

My problem is I can't seem to capture that error message. I've used waitfor and comread but neither seems to see the error message.

For this job I'll just filter out the duplicates but I'd really like to figure out how to do this. Any suggestions?

John Purser
 
One thing you might want to try is using the Monitor Window to see just what the other system is sending (maybe there is an escape sequence in the string somewhere that is throwing off the waitfor). To bring up the Monitor Window, select the Data | Monitor Window menu item and resize it so you can see the full width of the window. Incoming data is in red, while outgoing data is displayed in blue. The hex value of each character is displayed on the left, while the ASCII value is on the right hand side. Make sure that focus is set to the main Procomm window instead of the Monitor Window, otherwise no information will be displayed in the Monitor Window.
 
The less characters that you use, the more likely you are to capture the string. If there is an error number, try just using that.

It sounds like you nned to use "When Target" commands instead of Waitfor. "When Target" will capture strings any time the When condition is active. Unfortunately, you need to call a subroutine with the "When" command so it makes it more complicated.
Example:

Proc Main
String ERRPROMPT = "Not Unique" ; Whatever the error strin is.

When Target 1 ERRPROMPT call ERRHANDLE
;(The rest of your session)

End Proc

Proc ERRHANDLE
UserMsg "Not a unique entry."
Transmit "^m"
EndProc Robert Harris
Communications Advantage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top