Search code examples
powershellvbscriptautomationmainframejscript

Is there a way to automate simple repetitive tasks in mainframe terminal window?


My employer uses TN3270 Plus 2.07 version mainframe emulator. It is quite old version and does not support some of the scripting commands/features like waiting for screen refresh, "if" condition and simple computation instructions like incrementing etc, which are available in newer version. I need these features, so I can not use the builtin scripting.

It does not support DDE.

I was left with any options like VBScript, JScript or PowerShell (or any other option available in Windows 7 Enterprise with out installing third party tools like AutoIt).

What I need is, I want to be able to read some data from a file, enter that into mainframe terminal, wait until I receive a response from mainframe (it is quite random, some times instantanious but other times may take 20 to 30 seconds) i.e., wait for screen refresh. And then I want read the text from terminal window, depending on that information, I need to take some action like continue with reading next line from file loop or do some other thing.

Is there any way to achieve this?

Note: Changing the emulator or intalling 3rd party tools is not an option ;)


Solution

  • I have never tried it myself, but you might want to look at x3270 and specifically s3270 and possibly tcl3270:

    http://sourceforge.net/projects/x3270/

    Unless you are willing to put in the effort to write your own implementation of the 3270 protocol, some kind of 3rd party tool will be required. The question is one of cost in terms of time and licensing (with the above options, the only cost is time).

    Of course, it may yet be possible to do with your existing emulator, but I am not familiar with it and the version does seem rather old.