ibm_hosts is a host database for all of the emulators, and defines the contents of the x3270 Connect menu.
The ibm_hosts file contains information regarding IBM hosts on the network. An IBM host is a host which can communicate with a 3270 terminal emulator. Each line defines a name in the following format (optional fields are shown in brackets):
Fields are separated by any number of blanks or TAB characters.
A line beginning with
# is a comment.
The name field is a mnemonic used to identify the host.
The type field is a keyword that indicates the type of entry:
- The name will be included in the x3270 Connect menu.
- The name will not be included in the menu, but will still be accepted as valid input when a host name is required, such as by the Connect() action.
- The name of the host, plus options, using host name syntax.
- Actions to be executed once the connection is made and a data-entry field is defined by the host. If the text looks like an action, e.g.,
PF(1), it is unmodified; otherwise it is taken as a the parameter to the String() action.
Note: The ibm_hosts file is consulted only when a simple unadorned hostname is specified to the Connect() action. If the string passed to Connect() action contains any options (prefixes, LU names, port, match name), then ibm_hosts will not be used, even if there is a match for the name portion of the string.
Given the following ibm_hosts file:
mvs primary mvs-host tso alias mvs-host mvs2 primary mvs-host:4012 vm primary vtam Tab() String(3) Enter()
x3270 will display four names (mvs, mvs2, afhost and vm) on its hosts menu.
For all of the emulators, the names mvs and tso will cause connections to the host mvs-host. The name mvs2 will also cause a connection to mvs-host, but to port 4012 rather than the emulator's default port (usually 23). The name vm will cause the emulator to connect to the host vtam (presumably some sort of host-selection front-end), enter the string 3 on the second data-entry field on the screen, and send the Enter AID sequence.