Before the x3270(1) application can be executed, it must first be installed. This installation is done automatically when FLEX-ES is installed on a host server system. The installation steps are also described in a later chapter of the present document.
Before the installed x3270(1) application can be executed, several steps must be taken to modify the X Window System environment appropriately.
First, the xmodmap(1) and xset(1) commands must be used to modify the X environment to accommodate the x3270(1) keyboard mapping. In a standard FLEX-ES installation (where the FLEX-ES home directory is /usr/flexes), this is done by issuing the following three commands at the server OS command line (or as a part of a startup script):
xmodmap -e 'keysym Alt_L = Alt_L Meta_L'
xset fp+ /usr/flexes/fonts
xset fp rehash
These steps are also described in the volume FSIMM200 Release 7.0.10 Operator's Guide.
The executable file containing the x3270(1) application must also be in the server OS executable search path of the server OS user ID which is invoking the application.
The x3270(1) application is started from the server OS command line by starting the application with one or more parameters. A typical invocation might look like this:
x3270 -model 4 -keymap pc -port tn3270 localhost &
The meanings of the model, keymap, and port parameters are discussed in the next section. The final parameter is the name of the host to which x3270(1) will try to attach this 3270 terminal session. This final parameter is optional; if it is not specified, the application will run, but will not initially attempt to connect to a system. The final ampersand causes the command to be run in the background. By doing this, the x3270(1) terminal window appears on the screen as usual, but the control of the server OS command line from which this application is started is returned to the user. If this ampersand were omitted, the application would run correctly, but would retain control of the command line from which it was invoked. The file x3270, which is the application's executable, must be in the executable search path for the current server OS user ID.
Typically, an invocation such as this might be placed within a FLEX-ES startup script. A sample of such a startup script is provided with the FLEX-ES installation.
Parameters to the x3270(1) application are introduced by a single hyphen (minus sign), followed (without a space) by the keyword naming the parameter. Any data fields follow, separated from the keyword by a space. If the text of any of these fields contains spaces or other characters which might be interpreted by the server OS shell, the data field should be enclosed in quotation marks ("double quotes").
The following command-line parameter has been added by FSI. It is not available in ordinary versions of x3270, and is not useful save in conjunction with FLEX-ES
In addition to specifying the numeric IP address or DNS host name of the server to which x3270 is to connect, it is also possible to specify the terminal line name on that server to which a direct connection should be made, if possible. Specifying a terminal line name in this way bypasses the FLEX-ES Terminal Solicitor selection screen.
For example, if a terminal line called "console" exists and is not in use, x3270 could be instructed to connect to it in this way:
x3270 -model 4 -keymap pc -port tn3270 localhost:console
As this example illustrates, the name of the terminal line appears as a part of the final server name parameter, separated from the server name by a colon (without any white space).
The following command-line parameters are specific to x3270(1) (that is, they are not general X Window System parameters typically supported by many different X Window System applications).
The bfont parameter specifies the file name to be associated with the ".boldFont" resource. This resource defines the font to be used for bold text display. The font file so named must be available (typically, it is loaded into the directory /usr/flexes/fonts by the standard installation procedures) and its location must have been made known to the X Window System via the command:
xset fp+ /usr/flexes/fonts
xset fp rehash
as described in the volume FSIMM200: Release 7.0.10 Operator's Guide.
The efont parameter specifies the file name to be associated with the ".emulatorFont" resource. This resource defines the font to be used for normal text display. The font file so named must be available (typically, it is loaded into the directory /usr/flexes/fonts by the standard installation procedures) and its location must have been made known to the X Window System via the command:
xset fp+ /usr/flexes/fonts
xset fp rehash
as described in the volume FSIMM200: Release 7.0.10 Operator's Guide.
If this parameter is not specified, then x3270(1) defaults to the name specified by the ".emulatorFont" resource in the application defaults file. If this parameter is not specified and this resource does not exist, then the ".font" resource in the application defaults file is used. If this, too, fails, then a fixed-pitch font is tried. If this fails, then the application startup fails.
The keymap parameter specifies the name of the X Windows System keyboard mapping resource to be used by this instance of x3270(1). This keyboard mapping is found in the file
/usr/X/lib/app-defaults/X3270
If this application defaults file is not present, the application will refuse to start.
(Note that this application defaults file, in its location and in its format, is entirely independent of the file /etc/map3270 used by the tn3270(1) TN3270 "front-end" 3270 terminal emulation program.)
The resource name of the X Window System keyboard mapping supplied with FLEX-ES is "pc". To specify it, use a command line invocation of the form
x3270 -keymap pc . . .
where the ellipsis represents other parameters.
The x3270(1) application emulates an IBM 3278 or IBM 3279 terminal. The model parameter specifies the model of 3278 terminal to be emulated. The models supported are:
Model | Resolution (In Characters) |
3278-2A | 20 x 80 |
3278-2 | 24 x 80 |
3278-3 | 32 x 80 |
3278-4 | 43 x 80 |
3278-5 | 27 x 132 |
3278-2A-E | |
3278-2-E | |
3278-3-E | |
3278-4-E | |
3278-5-E | |
3279-2A | |
3279-2 | |
3279-3 | |
3279-4 | |
3279-5 |
If this parameter is omitted, or if an invalid terminal model is specified, then the model 3278-4 is used as the default.
The port parameter specifies the TCP/IP port at which the x3270(1) application will attempt to connect to the specified host. This port may be specified either as a numeric port number or as the symbolic name for that port which appears in the /etc/services file.
A typical invocation might specify
x3270 . . . -port tn3270 . . .
or
x3270 . . . -port 24 . . .
In these examples, the ellipsis represents other parameters.
In general, you should use the port's symbolic name, as it should be the same across all installations. It is possible for the port number to differ between hosts (this would happen if that port number were already in use by some other TCP/IP service at the time that the FLEX-ES system was installed on the host).
If this parameter is not specified, the default, tn3270, is used.
The x3270(1) application also responds to several general X Window System parameters. The most important of these are listed below; for a further discussion of them, see the documentation that came with your server, or any comprehensive set of X Window System documentation.
By default, if no display parameter is specified, x3270(1) attempts to display its windows on the current system's primary display. If this display is not writable by the server OS user ID which invoked the application, then the application invocation fails.
The display parameter allows the application's windows to be displayed on any system in the TCP/IP network. If the display specified is not writable by the server from which the x3270 application was invoked, then the application invocation fails. Please see your server documentation for information on how to use the server OS xhost(1) command or the server OS .rhosts file to specify permissions for X Window System displays. Note that allowing another host to display information on a given host's X Window System display has significant security implications which must be understood before such access is granted.
The display parameter is used thus:
x3270 -display othersystem:0 . . .
In this example, x3270(1) is invoked and is instructed to attempt to display its windows on the primary (0) display of a host named othersystem. The ellipsis represents other parameters.