Shell control over 5250 session

Joe Bittlingmaier <[email protected]> Fri, 29 Sep 2017 15:14:03 -0400
Newsgroups gmane.comp.emulators.tn5250
Message-ID <CAFjNYekFUHsOKC5W9m1VJmP3wr2qP2PGOFYKOe6azz97YcRN5g@mail.gmail.com>
Hello all,

First, let me to express my gratitude for your efforts in developing and
maintaining this project.

I have limited experience developing for *nix, but successfully compiled
and deployed the 0.17.5 version (linked to by James R in another thread) on
64-bit Ubuntu server 16.04. The documentation and discussion on this
site/list was and is a tremendous resource.

My rough goal is to script a series of actions (navigate menus, select
options) in tn5250, such that a given "script" can run as a cronjob on a
server (no X/GUI).

These are approaches I've tried so far:

1) run a macro defined in ~/.tn5250macros

   Pros: Functionality works 'out-of-the-box.' Inbuilt macro recorder is
very handy.

   Cons: A single macro can't effectively navigate menu structures due to
latency. And I do not know of a way to call macros from the shell, either
before or while tn5250 is running.

2) open a second shell and pipe keystrokes to /proc/xxxxx/fd/0

   Pros: Unix-y way of doing things

   Cons: characters come through first shell running tn5250 at cursor
location, but tn5250 doesn't treat them as valid. Chars are white, not
green.

3) hybrid of (1) and (2): record actions as macros, call macros using piped
keystrokes.

   Cons: haven't figured out how to pass non-text keystrokes [Ctrl+S], F
keys through the file descriptor (points to /dev/pts/0)

I understand that I could write a new program importing lib5250 or even
modify the tn5250 source. If feasible, I'd prefer a quicker, hackier
solution, but am not opposed to new development (not lazy, just not very
good at writing C...).

I'd appreciate any guidance you can offer as to whether I might be able to
implement a solution using the package as-is. If no, could you point me to
detailed documentation for the library?

Regards, Joe
-- 
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: LINUX5250-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/linux5250
or email: LINUX5250-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/linux5250.