0 votes
by (120 points)

We are looking to use Rebex Terminal Emulation to connect to an IBM System i (aka AS400).

Everything looks to be working great so far with the exception of being able to specify a 'Workstation ID'
We've tried Options.TerminalName() but no luck.

Here is IBM's info on it:

Is there a way to specify this anywhere in Rebex?
The current value must be blank as the System i is generating a default name.

Appreciate any help


1 Answer

0 votes
by (70.2k points)

The AS400 commonly uses terminal emulation from TN family (TN3270, TN5250, or similar). This is not supported by Rebex Terminal Emulation library. Only VT family is supported (and couple other terminal emulators in experimental mode). For complete list please visit Standards and platforms page.

The VT family terminals do not have any option for Workstation ID as far as we know. If you point us to a specification for this option (what should be sent to the remote host) we can assist you in solving this issue.

The TerminalOptions.TerminalName is used to negotiate terminal type with the remote host.

In more details:

  1. When connecting with SSH, the value of TerminalOptions.TerminalName is sent in the SSH_MSG_CHANNEL_REQUEST packet when requesting pseudo terminal (see RFC4254). Default value is xterm. If the value is string.Empty an empty terminal name is sent to the remote host.

  2. When connecting with TELNET, the value of TerminalOptions.TerminalName is sent when negotiating Terminal Type telnet option (see RFC1091). Default is xterm. If the value is string.Empty the DEC-VT100 is sent for terminal type.

I don't think the TerminalOptions.TerminalName is related to Workstation ID. Because we do not send any Workstation ID (we do not know how) it seems that the Rebex Terminal is not compatible with your AS400. Please make sure the Rebex Terminal can really work with your AS400.

Actually, how do you know that the issue is related to the Workstation ID? Did you get any related error?

by (120 points)
Thanks, appreciate the detailed answer.
You are correct, it looks like Workstation ID is only available for TN5250.

The terminal is working great, the Workstation ID would've been a nice addition but we can work without it :)

by (70.2k points)
To be honest, I am really surprised that you are able to use Rebex Terminal to communicate with AS400. I think, that your AS400 must be using VTxxx instead of TNxxxx, because VT and TN have very different escape sequence specifications.
I think that your AS400 automatically swapped to VTxxx when it received terminal type related to VT family (`xterm`, `DEC-VT100`, `vt100`, or whatever was used).

In your original question, you asked how to specify blank value for 'Workstation ID'. Since we don't use  'Workstation ID' at all, it should be blank by default. So, you probably want to know the value, which was generated by System i?

In such case, I would just try to print it out like other environment variables e.g. `echo $TERM`

I would use:  `echo $WORKSTATION_ID`
or:  `echo $WORKSTATIONID`
or print all environment variables using the `printenv` command and find the correct name manually.