IBM does not have scripting built-in to their Telnet program.

I have done scripting in the following ways (each an alternative -- no need to do all):

1) Using a 3rd party telnet client, such as one of the open source ones for Linux together with the Expect tool.

2) Writing a proxy that observes the Telnet data stream and inserts data... allowing the user to watch while the "script" (really a proxy) controls the action.

3) Using the Virtual Terminal APIs  (this is very advanced programming -- requires in-depth knowledge of the 5250 data stream.)

4) Using the EHLLAPI technique -- you rarely see this anymore -- but essentially allows a Windows program to take control of your 5250 emulator.  The emulator can then run the TELNET command, etc.

So it's certainly possible, but not necessarily easy.  Telnet is really designed for interactive use -- and while it's certainly possible to programmatically control it, even after getting past the problem of the "plumbing" (i.e. one the options above) the result isn't always that satisfactory, since applications aren't really designed for programmatic access.

As such I'd think long and hard about whether there's a better way before falling back to scripting a telnet session.



On 9/5/24 11:32 AM, Rob Berendt wrote:
I know of a few ways to script ftp. One of the easy ways is
OVRDBF FILE(INPUT) ...
OVRDBF FILE(OUTPUT) TOFILE(...
FTP ...
...

Can you do something like this with TELNET?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.