Login  
Search All Forums
Dart Home | PowerTCP Emulation for ActiveX | Custom Development Reply | PowerTCP Emulation / Telnet for ActiveX Topics | Forums   
AuthorForum: PowerTCP Emulation / Telnet for ActiveX
Topic: AS/400: When do we know its time for user input?
andrwo

From: Kuala Lumpur, Malaysia
Posts: 6
Member Since: 10/05/04
posted October 5, 2004 11:02 AM

Hi all,

I am very new to telnet & emulation, having been plonked yesterday into project of interfacing with a legacy AS/400 insurance application called Polisy (using VB.Net). I think I have figured out most of the crummy things with telnet negotiations and keymapping, but one thing still eludes me.

I am writing a synchronous program to execute a series of commands. The problem is that I cannot figure out at which point the AS/400 starts expecting key-input from the terminal. I thought that for every Send(data) I can then call Receive() to get all data in Buffer until BufferCount = 0, and then it should be ready for the next Send(data). This does not seem to be the case: it seems like even when BufferCount=0 the AS/400 can still be trying to send me something.

The best thing is that I will keep on trying to receive until it is time for user input, but what signifies it is ready for user input? Is there a general way or general convention to figure this out? Does the AS/400 applications by convention usually send something to denote user input (perhaps a Ready() code, or a set-cursor code, etc.)

If there is no way to guess, please let me know so I wouldn't be barking up the wrong tree - will have to explore more yuckky ways like delay timing. Or any other solutions anyone can propose? I think I will still bump into the same problem with Asynchronous solutions, I will receive multiple EndReceive() events but can't figure out at which point I am expected to start keying in info.

All your help is very much appreciated, and thank you in advance!

- Andrew
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted October 5, 2004 11:06 AM

Welcome to the wonderful world of scripting! The hardest part is determining what you need to search for.

I usually search for a CRLF + the command prompt in the situation you describe.

andrwo

From: Kuala Lumpur, Malaysia
Posts: 6
Member Since: 10/05/04
posted October 5, 2004 9:46 PM

Thanks for your reply, man.

The problem with that AS/400 app is that there does not seem to be a discernable, visible command prompt. But now that I've found a ANSI escape codes definition table, I'll look at the trace dump again to see if I can fathom any way of predicting it based on cursor settings. Sigh, back to the drawing board...
Reply | PowerTCP Emulation / Telnet for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX