If you only need 3270 form-mode functions, you might try to adapt code from tn3270 (on, e.g., ucbarpa.berkeley.edu). Of course, if the tn3270 code were written with any thought to modularity, you'd be able to use it directly in your application. ---Dan