C H A P T E R 2 |
Using Sun MTP J3270 |
This chapter covers the following topics:
This section describes how to start Sun MTP J3270 on various platforms.
1. Change to the bin directory of the Sun MTP J3270 installation, or verify that the bin directory is in your path.
2. Type the j3270 command with or without parameters.
Use one of the following methods:
With all of these methods, you can specify startup parameters. You can modify the properties of the Start button entry for the 3270 Terminal or the properties of a shortcut you created. At a command prompt, specify the options on the command line. Command Line Parameters describes these parameters.
You can start Sun MTP J3270 with a series of parameters. Supplying a URL or host and port causes the emulator to automatically attempt a connection to the specified host.
j3270 [-h hostname [-p portnumber]] | [-u URL] [-m model] [-f font] [-n netname] [-t timeout-value] [-s print-style] [-c codepage] [-x] [-r [filename]]
The emulator window has three parts: the menu bar, the emulator itself, and a status bar.
The emulator's menu bar has five items: File, Edit, Settings, Advanced, and Help.
The File menu also displays the last four systems the emulator connected to. When the emulator is disconnected, clicking on one of the systems causes the emulator to attempt to connect to it.
When the emulator is connected, it responds to keyboard input like a standard 3270 terminal. For information on how 3270 keys are mapped to keys on your keyboard, see Specifying Keyboard Mapping.
By default, the terminal does not automatically disconnect (timeout) from a system that it is connected to. If you want it to automatically timeout, you must specify a terminal timeout value when starting Sun MTP J3270. See Command Line Parameters for information about the timeout startup parameter.
The status bar displays information about the terminal and is divided into sections.
The labels in FIGURE 2-3 indicate each section of the status bar and are described in the following table:
If you specify the -h hostname or -u URL parameters when starting Sun MTP J3270, the emulator automatically attempts to connect to the specified host system. If you do not specify the -h or -u parameters, use the following procedure to connect to a host.
1. Start Sun MTP J3270 by selecting it on the Start menu or by typing j3270 at a command prompt.
The terminal emulator window is displayed.
2. Select File Connect to display the Connect window.
3. Set the attributes by typing values in the following fields:
a. In the Host field, type the host name.
b. Type a port number in the Port field; the default is 2001.
This is the same as the port number specified as the TNServer*ListenPort in the unikixrc.cfg file.
c. Select a terminal type for the Terminal Type field using the drop-down menu; the default is 3278-2-E.
d. Select a codepage for the Host Codepage field by using the drop-down menu.
The default is IBM-1047 (Open Edition). The supported codepages are listed in Command Line Parameters.
e. The Coerce EW to EWA field is enabled only for Terminal types 3278-3,
3278-3-E, 3278-4, 3278-4-E, 3278-5, and 3278-5-E.
Some TN3270 servers do not generate correct 3270 datastreams for these terminal types. When you check this box, Sun MTP J3270 displays the screens correctly.
Note - The coerce option is available only on the Connect window. There is no equivalent command line parameter. |
f. Check or deselect the Allow TN3270E check box, which allows the use of the TN3270E protocol when connecting to the remote system.
g. Type a value in the Netname field.
If you checked Allow TN3270E, you can request a specific netname for the terminal.
4. Click Connect to start the connection process.
A message is displayed if Sun MTP J3270 fails to connect to the specified host. If you connect successfully, the first screen of the 3270 host is displayed.
Use the copy action to copy the current emulator display to the clipboard of your operating system. To paste the contents of the system clipboard to the Pathway Terminal, use the paste action. The emulator cursor must be in a field that permits keyboard input to perform a successful paste operation.
By default, Ctrl-C can be used for the copy command and Ctrl-V for the paste command. These keystrokes can be remapped in the usual manner.
A real 3270 emulator has a number of special keys, such as Clear and Reset, that are not provided on the standard PC keyboard. Sun MTP J3270 maps certain keys and key combinations to the actions of these special keys.
On the emulator window, select Help
Key Mapping.
Edit the .j3270.keymap.properties file, which is located in your $HOME directory.
The following example shows some lines from this file:
pressed.BACK_SPACE=backspace shift.pressed.TAB=backtab pressed.ESCAPE=pressClear pressed.ENTER=pressEnter ctrl.pressed.ENTER=newline |
Each line in the .j3270.keymap.properties file maps one or more keystrokes to an action. Be careful when editing this file and be sure the keystrokes and action names are correct. If any actions are specified incorrectly, error messages are displayed when you start Sun MTP J3270.
It is permissible to map multiple keys to one action. For example, to map Ctrl-Z and Shift-Enter to the newline action, type the following lines in the properties file:
CTRL.pressed.Z=newline SHIFT.pressed.ENTER=newline |
Do not assign the same keystroke for two actions. For example the following lines, which attempt to assign Ctrl-Z to backspace and newline, will not work:
CTRL.pressed.Z=backspace CTRL.pressed.Z=newline |
You cannot change the key map while Sun MTP J3270 is running. You must stop Sun MTP J3270, edit the file, and restart Sun MTP J3270.
2. Delete the .j3270.keymap.properties file.
The .j3270.keymap.properties file is automatically recreated.
When you resize Sun MTP J3270, it attempts to change the font size of the emulator, so that the emulator fits the specified size. This provides a simple way to make the emulator display more readable. However, it might result in an area smaller than the one you specified. If you are having difficulty achieving the results you want using this method, use the Font Dialog to specify a particular size.
There is a dump function within Sun MTP J3270 to enable you to obtain diagnostic information about the current state of the terminal.
Note - This diagnostic information is primarily for the use of support personnel and is unlikely to be of direct interest to most users. |
The diagnostic dump command saves Sun MTP J3270 diagnostic information to a file. The file is saved to the directory from which the Sun MTP J3270 was started. When you issue a dump, a message displays the file and directory name. The dump saves general information about the emulator, as well as the current screen. If tracing is turned on, the file will also contain the data flows from the emulator to the host and from the host to the emulator. The trace information is from the time tracing was started until the time the dump was taken.
To use Sun MTP J3270 in (double-byte character set (DBCS) mode, choose one of the available DBCS codepages on the Connect window, or specify a DBCS codepage using the -c parameter of the j3270 command.
When running in DBCS mode, each 3270 field is one of the following types:
A pure single-byte field can only contain single-byte characters. Any attempt to type a character into a pure single-byte field that is not a single-byte character results in a terminal alarm.
A pure double-byte field can only contain double-byte characters. A double-byte character occupies two display positions and is twice the physical width of a single-byte character. Any attempt to type a character that is not a double-byte character into a pure double-byte field results in a terminal alarm.
Note - A character is considered double-byte if its representation in the selected host codepage is two bytes. |
A SOSI field can contain both single- and double-byte characters. You must enclose all double-byte characters in a SOSI field within a pair of SOSI characters.
You can configure some web browsers so that any links to TN3270 hosts are started with Sun MTP J3270. When you click on the link, the browser starts Sun MTP J3270 and attempts to make a connection to the TN3270 system.
On your Windows system, associate files of type URL:TN3270 Protocol with
j3270 -u. You must have Sun MTP J3270 in your path or you must specify the complete path name where the j3270 executable is installed. Refer to Windows Help for instructions on associating files.
Copyright © 2002, Sun Microsystems, Inc. All rights reserved.