C H A P T E R  2

Using Sun MTP J3270

This chapter covers the following topics:


Starting Sun MTP J3270

This section describes how to start Sun MTP J3270 on various platforms.


procedure icon  To Start Sun MTP J3270 on Solaris and UNIX Systems

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.

See Command Line Parameters.


procedure icon  To Start Sun MTP J3270 on Windows Systems

single-step bulletUse 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.


Command Line 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.

Format

j3270 [-h hostname [-p portnumber]] | [-u URL] [-m model] [-f font]
[-n netname] [-t timeout-value] [-s print-style] [-c codepage] [-x]
[-r [filename]]

where:

-h hostname

Name of TN3270 server host.

-p portnumber

Port number of TN3270 server. This is the same as the port number specified as the TNServer*ListenPort in the unikixrc.cfg file.

-u URL

TN3270 host and port specified as a URL. For example:

tn3270://myserver.com:2002

-m model

Terminal model; valid values are: 2, 2-E, 3, 3-E, 4, 4-E, 5, and 5-E.

The default model is 2-E.

-f font

font is in the format name.style.size. For example:

-f Monospaced.PLAIN.12.

-n netname

If you allow TN3270E, you can request a specific netname for this terminal.

-t timeout-value

Host inactivity timeout-value in seconds. Sun MTP J3270 automatically disconnects from the host after a period of inactivity. Inactivity is determined from the last time any network activity between the host and Sun MTP J3270 occurred. The default is not to time out, which is the same as specifying
-t 0.

-s print-style

Style to use for printing. Valid values are:

  • normal: Print same as appears on screen
  • whiteonblack: Print in white on a black background
  • blackonwhite: Print in black on a white background
  • coloronwhite: Print in color on a white background

The default is normal.

-c codepage

Code page to use. One of the following:

  • IBM-037 (US English, Portuguese, Canadian French)
  • IBM-273 (German)
  • IBM-277 (Danish, Norwegian)
  • IBM-278 (Finnish, Swedish)
  • IBM-280 (Italian)
  • IBM-284 (Spanish)
  • IBM-285 (UK English)
  • IBM-297 (French)
  • IBM-500 (Belgian, Swiss German)
  • IBM-870 (Croatian, Czechoslovakian, Hungarian, Polish, Romanian, Serbian Latin, Slovak, Slovene)
  • IBM-875 (Greek)
  • IBM-930 (Japanese DBCS)
  • IBM-933 (Korean DBCS)
  • IBM-935 (Simplified Chinese DBCS)
  • IBM-937 (Traditional Chinese DBCS)
  • IBM-939 (Japanese DBCS)
  • IBM-1025 (Bulgarian, Macedonian, Serbian Cyrillic, Russian)
  • IBM-1026 (Turkish)
  • IBM-1047 (Open edition)
  • IBM-1140 (US English - Euro)
  • IBM-1141 (German - Euro)
  • IBM-1142 (Danish, Norwegian - Euro)
  • IBM-1143 (Finnish, Swedish - Euro)
  • IBM-1144 (Italian - Euro)
  • IBM-1145 (Spanish - Euro)
  • IBM-1146 (UK English - Euro)
  • IBM-1147 (French - Euro)
  • IBM-1148 (Multilingual - Euro)
  • IBM-1149 (Icelandic - Euro)

-x

Excludes the use of the TN3270E protocol when connecting to the remote system. Only TN3270 is used.

-r [filename]

Identifies the remote animation file to use. The file name is optional. If no file name is specified, Sun MTP J3270 uses the file J3270-directory/etc/animator_command.

Remote animation is supported only on Windows platforms.



3270 Emulator Window

The emulator window has three parts: the menu bar, the emulator itself, and a status bar.

 FIGURE 2-1 Disconnected Emulator

Screen shot showing the disconnected emulator window with a welcome message.

The Menu Bar

The emulator's menu bar has five items: File, Edit, Settings, Advanced, and Help.

 FIGURE 2-2 Menu Bar

Screen shot showing options for each menu item on the menu bar.[ D ]

The menu bar enables you to:

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.

The Emulator

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

The status bar displays information about the terminal and is divided into sections.

 FIGURE 2-3 Status Bar

Screen shot of the status bar. Each section of the status bar is labeled.

The labels in FIGURE 2-3 indicate each section of the status bar and are described in the following table:

Label

Description

Cursor Position

Indicates the row and column numbers of the cursor position.

Keybd Lock

Indicates if the keyboard is locked.

Unused

Indicates that this section is not used.

Term Mode

Indicates the terminal mode. Displays 3270, NVT, or SUSP.

Netname

indicates the netname of the terminal, if there is one.

Byte Set

The byte set of the field that the cursor is currently on: either SBCS (pure single byte), SOSI (a combination of single and double byte), or DBCS (pure double byte). These values are displayed only when the host is connected using a double-byte code page. If the terminal is connected using a single-byte code page, this area is blank.

Num

Indicates whether the field is numeric. Displays Numeric if the current field is numeric, or else it is blank.

Typing Mode

Indicates the typing mode. Displays either Insert or OverType.



Connecting to a 3270 System

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.


procedure icon  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 right arrow Connect to display the Connect window.

 FIGURE 2-4 Emulator Connect Window

Screen shot of the emulator 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 code page for the Host Codepage field by using the drop-down menu.

The default is IBM-1047 (Open Edition). The supported code pages 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.



Note - The last four systems that were connected to, either successfully or unsuccessfully, are displayed on Sun MTP J3270 File menu. Clicking on one of these entries causes Sun MTP J3270 to automatically attempt to connect to that host.




Copy and Paste

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 J3270 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.


Specifying Keyboard Mapping

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. You can also use key mapping to control cursor movement on the screen. For more information about cursor control, see Accessibility Features of Sun MTP J3270.


procedure icon  To View the Current Key Mapping

single-step bulletOn the emulator window, select Help right arrow Key Mapping.


procedure icon  To Change the Current Key Mapping

single-step bulletEdit 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.


procedure icon  To Restore the Key Mapping to the Default Values

1. Stop Sun MTP J3270.

2. Delete the .j3270.keymap.properties file.

3. Restart Sun MTP J3270.

The .j3270.keymap.properties file is automatically recreated.


Resizing Sun MTP J3270

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 Settings right arrow Font option to specify a particular size.


Diagnostic Information

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.


Using Sun MTP J3270 in DBCS Mode

To use Sun MTP J3270 in double-byte character set (DBCS) mode, choose one of the available DBCS code pages on the Connect window, or specify a DBCS code page using the -c parameter of the j3270 command.

Available 3270 Field Types

When running in DBCS mode, each 3270 field is one of the following types:

  • A pure single-byte field
  • A pure double-byte field
  • A mixed single- and double-byte field known as a SOSI (shift-out, shift-in) field

Restrictions on a Pure Single-Byte Field

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.

Restrictions on a Pure Double-Byte Field

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 code page is two bytes.



Restrictions on Mixed (SOSI) Fields

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.

  • SO and SI characters each occupy a display position.
  • By default, an SO character appears as a "less than" symbol, <.
  • By default, an SI character appears as a "greater than" symbol, >.
  • SO and SI characters are inserted automatically as a terminal user types. The terminal user does not have to enter them.
  • Any keyboard entry operation that would leave DBCS characters outside an enclosing SOSI pair is invalid and is rejected with a terminal alarm; for example, deleting an SI character that would leave a DBCS character immediately adjacent to a single-byte character set (SBCS) character.
  • An attempt to enter DBCS characters that does not leave room for the required SO and SI characters to be automatically inserted in the field is rejected with a terminal alarm; for example, typing a DBCS character in the last two display positions of a SOSI field.

The appearance of SO and SI symbols can be changed from the default to display either as blank characters, or as right and left pointing arrows, respectively. Use the menu option Settings right arrow SO and SI to make the change.


Making an Association With an Internet Browser



Note - This section applies to users on Windows systems.



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.


Accessibility Features of Sun MTP J3270

The Sun MTP J3270 software contains accessibility features, which make it usable by assistive technologies. Using the Sun MTP J3270 software with the Sun MTP software makes Sun MTP accessible by assistive technologies.

The accessibility features of Sun MTP J3270 are:

  • Three color schemes:
    • Standard: The emulator displays colored text.
    • High contrast 1: The emulator text is white and the background is black.
    • High contrast 2: The emulator text is black and the background is white.

Controls to set the color scheme, are located on the Settings menu. See FIGURE 2-2.

  • Controls that move the cursor around the screen:
    • Move to first field: Moves the cursor to the first character position of the first field of the screen
    • Move to next field: Moves the cursor to the first character position of the next field relative to the field where the cursor is located
    • Move to previous field: Moves the cursor to the first character position of the previous field relative to the field where the cursor is located

These controls accommodate those assistive technologies that require the cursor to be in a field for that field to be accessed.

These movement controls differ from the Home, Tab, and Backtab controls, which only move the cursor to editable fields. These movement controls move the cursor to all fields.

To view the current key mappings for these controls, follow the procedure in To View the Current Key Mapping. To define these movement controls, see To Change the Current Key Mapping.

  • Support for the Java Accessibility API, which ensures that Sun MTP J3270 is accessible by assistive technologies that conform to the API. For example, a screen reader technology that conforms to the Java Accessibility API can read the contents of the emulator screen.

The Java Access Bridge is required for an assistive technology to interact with a JVM. Before an assistive technology can be used with the Sun MTP J3270 emulator, the Java Access Bridge must be installed into the JVM that is to be used to run the emulator. Note that the Windows version of Sun MTP J3270 is distributed with its own JVM, which is used to run the emulator. You must ensure that this JVM has the Java Access Bridge applied to it to enable assistive technologies.

The Java Access Bridge can be obtained from:

http://java.sun.com/products/accessbridge

For instructions on how to install the Java Access Bridge, refer to its documentation.



Note - DBCS and SOSI fields might not report the correct information when an assistive technology inquires about the fields' contents.