I am attempting to create a telnet client that I can use to transfer green screen RPGLE apps to fancier client applications. I am able to establish a sockets connection and I have sent in a default “enter” command to access the log in screen but I don’t know where to began to interpret where the fields are, where the server id of the session is stored, how to send back a comment, and how to identify the type of field. Does anyone know some good decent documentation that describes the communication between the telnet client and its server? I’ve tried looking online with no avail.
I am writing this using the Microsoft Visual Studio 2010 (vb.net).
You might find the free TN5250 terminal emulator useful in your quest. Check out the developer resources on the Sourceforge link below. Worst case, you could peruse the source code to see how they’re decoding the 5250 data stream.
http://tn5250.sourceforge.net/
You might also consider piggy-backing on top of an existing terminal emulator, such as the 5250 emulator that comes with IBM Client Access. Then you’d use EHLLAPI to communicate with and manipulate the terminal emulator from your code. The benefit here is that you wouldn’t have to implement a terminal emulator from scratch. Note, however, that if you use Client Access you need to consider licensing. (see related question)
Check out IBM’s EHLLAPI FAQ for more info.