TCP/IP DOS Utilities

Emulating a Remote Terminal

Part 3/9

Previous:    Displaying User Information

Next:    Transferring Files

 

Emulating a Remote Terminal

1.  Introduction

The LAN WorkPlace® utilities include two terminal-emulation utilities, TNVT220 and TSU, and a key-mapping utility, KEY220. These utilities enable your workstation to emulate a terminal directly connected to any remote host that is running a TELNET or NVT server program.

TNVT220, a DOS terminal emulator, enables your workstation to emulate a DEC* VT220, VT100*, VT52*, or ANSI remote terminal or to emulate no terminal (that is, to read characters from STDIN and write characters to STDOUT). The KEY220 utility compiles mapping files that link your workstation's keys to the VT220 keyboard functions. The TELNET Session Utility (TSU) enables you to use network-compatible third-party terminal emulators that use the TelAPI interface to emulate a remote terminal.

2.  Running a Terminal Emulation with the TNVT220 Utility

When you start the TNVT220 utility, TNVT220 prompts you to log in to the remote host you specify, establishes a session with that host, and displays a prompt for that host. At the prompt, you can enter commands for the host, suspend the session to modify the communications or emulation setup, suspend the session to run DOS commands, or stop the session.

Starting the TNVT220 Utility

The TNVT220 utility can open both TELNET and NVT transport-type sessions. By default, TNVT220 opens a TELNET session when you specify a hostname with the TNVT220 command. You can change the type of session TNVT220 establishes by modifying the TelAPI transport environment. To do this, see "Changing the Default Transport Type".

When you open a TELNET session, you can customize the session by including options. If you need to customize a TELNET session, see "Starting TNVT220 with a Special TELNET Emulation". If you open an NVT session, you need only specify a hostname.

To start the TNVT220 utility, type the following command:

TNVT220 Enter

Once TNVT220 starts, it displays the TNVT220 prompt to let you know that the TNVT220 command mode is active. You can type commands at this prompt to open, modify, and close sessions.

You can also open a session when you start the TNVT220 utility by including a hostname with the TNVT220 command. The following figure shows how to open a session when starting the TNVT220 utility.

fig3-01

When TNVT220 begins an emulation, it displays a status line. This status line lists the name of the remote host, the session number, the cursor mode, the time of day, any special keys you press, and the current keyboard modes. The following figure shows how TNVT220 displays this information:

fig3-02

If you do not see a status line, either your workstation is not emulating a VT220, VT100, or VT52 terminal, or someone turned off the status line during an earlier terminal emulation. To display the status line again, see "Changing the Display Setup Characteristics".

Once you have started a session, you can operate applications running on the remote host. TNVT220 supports all VT220 functions and features except the following:


Starting TNVT220 with a Special TELNET Emulation

You can specify special setups when you start a TELNET terminal emulation. You do this by including options and parameters with the TNVT220 command. The following table describes how to use these command-line options and parameters:

TNVT220 Options and Parameters
Options and Parameters Description
-C {ASCII | BINARY}  This option sets the character type to ASCII or BINARY. The default character type is ASCII, unless the remote host selects BINARY.

ASCII mode requires a VT220 7-bit, VT100, or VT52 emulation; BINARY mode requires a VT220 8-bit emulation. For information on defining terminal types, refer to the -T option in this table. 

ASCII sessions modify the data stream with end-of-line (EOL) character sequences; BINARY sessions do not modify the data stream. For information on specifying EOL sequences, refer to the -R and -S options in this table. 

-F mapfile  This option loads the mapfile that defines how your workstation keys are mapped to VT220 function keys. The mapfile can be in your current directory or the \NET\HSTACC directory. A mapfile must be a compiled binary file with a .BIN file extension. If you omit the extension, TNVT220 adds it. 

If you omit the mapfile option, TNVT220 uses the EXTMAP.BIN mapfile to map your workstation's keys. 

See "Changing TNVT220 Keyboard Functions with the Key220 Utility" for information on creating and compiling a mapfile for use with TNVT220. 

-H  This option displays descriptions of the TNVT220 command-line options. 
-K {E | S}  This option defines which type of keyboard you are using for terminate- and-stay-resident programs that take control of your keyboard. 

To define an extended keyboard with 101 or 102 keys, include an E after the -K option. To define a standard keyboard with 83 or 84 keys, include an S after the -K option. 

-O interrupt_process  This option changes the interrupt character sequence that you can use to halt a process running on a remote host. The default interrupt character sequence is ^O, which you type as <Ctrl>+<O>. 

To create a single-character interrupt, type the interrupt character after the -O option. To interrupt a remote host process, press the key for that interrupt character. 

To create a control-character interrupt, type a caret (^) followed by the interrupt character after the -O option. To interrupt a remote host process, type <Ctrl>+<character>. 

To create a Del-key interrupt, type a caret (^) followed by a question mark (?) after the -O option. When you need to interrupt a remote host process, press the numeric <Del> (with Num Lock mode disabled). 

This option is the same as the SETIP command described in Table 3-2.

-R {CR | LF | BOTH}  This option specifies how TNVT220 translates EOL sequences it receives from the host. The network EOL sequence is a carriage-return and line-feed pair (CR-LF). TNVT220 can interpret this sequence as a carriage return (CR), a line feed (LF), or as a carriage-return and line- feed pair (BOTH). By default, TNVT220 interprets this as BOTH. 

This option has no effect on a TNVT220 session when the character type is set as BINARY, or when local echo mode is active and LINEMODE is enabled. To change the character mode from BINARY to ASCII, see the -C option in this table. To enable or disable the LINEMODE setting, see "Display Options for the Characters You Type". To change between local echo and remote echo modes, see "Changing the General Setup Characteristics".

This option is the same as the RECVEOL command described in Table 3-2. 

-S {CR | LF | NONE}  This option specifies how TNVT220 translates the EOL sequences it sends to the network. The network EOL sequence is a carriage-return and line-feed pair (CR-LF). TNVT220 can include a carriage return (CR), a line feed (LF), or no EOL sequence (NONE). By default, TNVT220 sends a CR. If you specify NONE or LF, TNVT220 sends a carriage return-null sequence when it receives a carriage return from the terminal emulator. 

This option has no effect on the TNVT220 session when the character type is set as BINARY or when local echo mode is active and LINEMODE is enabled. To change the character mode from BINARY to ASCII, see the -C option in this table. To enable or disable the LINEMODE setting, see "Display Options for the Characters You Type". To change between local echo and remote echo modes, see "Changing the General Setup Characteristics". 

If the remote host is running Berkeley's UNIX 4.2BSD, you must set the -S option to NONE in order for TNVT220 to work properly. This avoids problems resulting from an error in the 4.2BSD TELNET server program. 

This option is the same as the SENDEOL command described in Table 3-2. 

-T terminal_type  Specifies the terminal type your workstation is going to emulate. If you do not include this option, TNVT220 determines the terminal type from the Terminal Emulation Mode setting, which you can set with the General Setup menu. To change this setting, see "Changing the General Setup Characteristics" on page 3-46. 

You can type a string of up to 10 characters for the terminal_type; however, the host is likely to recognize only the following terminal types: DEC-VT220, VT220, DEC-VT100, VT100, DEC-VT52, ANSI, and UNKNOWN (for no emulation). 

-X  You can indicate that your terminal is not compatible with either IBM's ROM BIOS or IBM's hardware by including the -X option with the TNVT220 command. This indicates that your terminal is only DOS compatible. By default, TNVT220 assumes that your workstation is compatible with IBM's ROM BIOS or IBM's hardware. 

If you specify the -X option, the emulation mode is automatically set to ANSI, you cannot display the screen status line, you cannot use the emulation setup mode, and the screen cannot be saved or restored when you suspend TNVT220 or return from a suspended TNVT220 session. To use ANSI emulation mode, include the line DEVICE=ANSI.SYS in the CONFIG.SYS file. In addition, when you specify the -X option, you must copy the \NET\SAMPLE\XT4_DEF.PAR file to \NET\HSTACC\T4_DEF.PAR to enable the proper terminal characteristics for a terminal that is only DOS compatible. 

remote_host  This parameter specifies the name of the TELNET or NVT server's host. You can specify either a symbolic name or an IP address for the remote_host variable. 
[ port ]  This parameter indicates the port that the TELNET daemon uses if you do not want it to use port 23. 


Printing a Copy of the Terminal Screen

While you use applications on a remote host, you can print the contents of the emulated screen. If a printer is configured to your workstation, you can print a copy of your screen by following these steps:


Ending an Emulation

When you are finished using a TNVT220 terminal emulation session, quit and return to the DOS prompt using either of the following methods:

With each of these methods, TNVT220 ends the current session with the remote host and returns you to the DOS prompt at the drive and directory where you started the TNVT220 utility.

When you exit from a remote application or host, log out of that application or host rather than merely exiting the TNVT220 emulation. This ensures that the remote application or host is properly terminated so that you can log in again. If you just use the EXIT command, you might suspend a session on the remote host without closing it.


Changing TNVT220 Communications with a Host

After you begin a TNVT220 terminal emulation session, you can modify the TNVT220 communication characteristics by switching from emulation mode to command mode and entering TNVT220 commands.

To switch to TNVT220 command mode, press <Alt>+<T>. This action suspends the session and starts the TNVT220 command mode. When TNVT220 is in command mode, it displays the TNVT220> prompt, and you can enter TNVT220 commands. The following sections describe these commands.

Entering TNVT220 Commands

To enter a TNVT220 command, type the command name followed by the options you need, as indicated in Table 3-2, and press <Enter>. You can type either the full command name or as many characters of the command name as are needed to differentiate it from any other command. For example, to display the status of the current session, you can type either STATUS or ST, then press <Enter>. (You cannot type the letter S only because there is more than one command beginning with that letter.

TNVT220 Commands
Command  Description 
ASCII [ session_number | hostname ]  This command requests an ASCII mode session with the remote server. If you do not specify session_number or hostname, the command affects the current session. 
BINARY [ session_number | hostname ]  This command requests a BINARY mode session with the remote server. If you do not specify session_number or hostname, the command affects the current session. 
CHARLOCAL [ session_number | hostname ]  This command immediately sends the characters you type to the server you specify. Characters are echoed by your terminal. If you do not specify the session_number or hostname, the command affects the current session. 
CHARREMOTE [ session_number | hostname ]  This command immediately sends the characters you type to the server that you specify. Characters are echoed by the remote server. If you do not specify the session_number or hostname, the command affects the current session. 
CLOSE [ session_number | hostname ]  This command closes the specified session_number or the session connected to hostname. If you omit the session_number or hostname, TNVT200* closes the current session. 
CODEPAGE  This command displays the number of the active code page. 
HELP [ command ]  This command lists all TNVT220 commands. If you specify command, TNVT220 displays information about that command. 
LINEMODE [ session_number | hostname ]  This command buffers the characters you type until you type a line terminator (that is, a carriage return or valid escape sequence). Your terminal echos the characters as you type them. If you omit session_number or hostname, the command affects the current session. The remote host can negotiate a change to remote echo, making CHARREMOTE the active state (see the CHARRREMOTE command in this table for more information). 
NVTOPEN [ hostname ]  This command establishes an emulation session with an NVT host that you specify as hostname. If you do not specify hostname, TNVT220 displays a list of hosts for your selection. 
OPEN { [ [ options ] hostname [ port ] ] | [ hostname ] }  This command establishes either a TELNET or NVT emulation session, depending on the setup of the TelAPI transport environment. Unless you change the TelAPI transport environment or the TELNET module is not included with TNVT220, the OPEN command establishes a TELNET session. For information on changing the TelAPI transport environment, see "Defining the Terminal Emulation" on page 3-20. 

If you are opening a TELNET session, you can specify special setup options and a port along with hostname. In this case, the OPEN command is equivalent to the TELOPEN command (see the TELOPEN command in this table for more information). 

If you are opening an NVT session, you can either specify hostname or display a listing of NVT hosts by omitting hostname from the OPEN command. In this case, the OPEN command is equivalent to the NVTOPEN command (see the NVTOPEN command in this table for more information). 

QUIT  This command closes all TELNET and NVT sessions, exits TNVT220 command mode, and returns to DOS. 
RECVEOL { CR | LF | BOTH } [ session_number | hostname ]  This command specifies how TELNET translates EOL sequences received from the host. If you omit session_number or hostname, the command affects the current session. This command is the same as the -R command-line option described in Table 3-1. 
RESUME [ session_number | hostname ]  This command resumes a session. TNVT220 resumes the specified session_number, or the session connected to hostname. This session becomes the current session. If you omit session_number or hostname, TNVT220 resumes the current session. 
SELECT { session_number | hostname }  This command makes the specified session the current session. 
SENDEOL { CR | LF | NONE } [ session_number | hostname ]  This command specifies how TELNET translates EOL sequences sent by TNVT220. If you omit session_number or hostname, the command affects the current session. This command is the same as the -S command-line option described in Table 3-1 on page 3-5. 
SESSIONS  This command lists the sessions you have established. 
SETIP interrupt_process  This command sets the remote host interrupt process character. This command is the same as the -O command- line option described in Table 3-1. 
SGA [ session_number | hostname ]  This command requests that the remote host suppress or not suppress go-aheads. Negotiation with the server for this takes place after you execute this command. The TNVT220 client always negotiates SGA. This command is a toggle switch. If you omit session_number or hostname, the command affects the current session. 
STATUS [ session_number | hostname ]  This command displays the status for a TNVT220 session. If you omit session_number or hostname, this command affects the current session. 
TELOPEN [ options ] hostname [ port ]  This command establishes an emulation session with the TELNET server you specify as hostname. If the TELNET server is not using port 23, you must include the port number it is using as port. You can include any of the command-line options to specify a special setup (see Table 3-1). The most recently opened session is the current session. 
? [ command ]  This command lists and describes all TNVT220 commands. If you specify command, TNVT220 displays the format of the command and a brief description. 
This command suspends the TNVT220 session and escapes to the DOS prompt. From the DOS prompt, you can execute any DOS command. Type EXIT to return to the TNVT220 command mode. 

 

Displaying TNVT220 Command Information

You can display a list of TNVT220 commands with brief descriptions by typing one of the following commands:
? <Enter>

HELP <Enter>
You can display a detailed description of a command by including the command name with the Help command:
? command_name <Enter>

HELP command_name <Enter>

Exiting the Command Mode

When you have completed your modifications to the TNVT220 communications setup, exit the command mode by either resuming the suspended emulation or quitting the TNVT220 utility.

To exit the command mode and return to the suspended terminal emulation, type the following command:

RESUME <Enter>
To exit both the command mode and TNVT220 utility, type the following command:
QUIT <Enter>
The QUIT command prompts you to confirm that you really want to close all sessions. Press <Y> to confirm. TNVT220 closes all established sessions, exits the TNVT220 application, and returns you to the DOS session that you suspended when you started the TNVT220 application.

Opening TELNET Sessions

After you start the TNVT220 utility, you can open TELNET sessions by typing the following command:
TELOPEN [ options ] hostname [ port ] <Enter>
The OPEN command starts sessions of whatever transport type is set as the default for the TNVT220 application. When the default transport type is TELNET, you can use the OPEN command to start TELNET sessions.

In place of options, you can include command-line options to specify special setup characteristics (see "Starting TNVT220 with a Special TELNET Emulation"). If your TELNET session is not going to use port 23, you must specify which port it is going to use by including a port number in place of port.

Establishing multiple emulation sessions with the same host can lead to resource contention on the host. This problem can prevent some users from logging in to the host.

Selecting an NVT Host

After you start the TNVT220 utility, you can open NVT emulation sessions by typing the following command:
NVTOPEN hostname <Enter>
If you modify the TNVT220 utility to open NVT sessions by default, you can use the OPEN command to open NVT emulation sessions. In this case, the OPEN command uses the same format as the NVTOPEN command. For more information on changing emulation types, see "Changing the Default Transport Type".

If you do not know the name of the NVT host, type the following command to display a list of NVT hosts:

NVTOPEN <Enter>
After you enter the NVTOPEN or OPEN command, TNVT220 displays a listing of the NVT hosts for your selection. The following figure shows how to display this list and select an NVT host:

fig3-03

When you start the TNVT220 utility, TNVT220 determines the number of NVT hosts available to your network, then allocates space to list those hosts plus 10 additional hosts that may become available while you run TNVT220. If more than 10 additional hosts become available, exit and restart the TNVT220 utility to display a full listing of hosts.

Listing the Established Sessions

You can display a list of established sessions by typing the following TNVT220 command:
SESSIONS <Enter>
TNVT220 displays the information shown: fig3-04

Selecting a Session

You can switch sessions while in TNVT220 command mode by typing the following command:
SELECT { session_number | hostname } <Enter>
Enter the SESSIONS command to confirm that TNVT220 switched active sessions. When you are ready to work with that session, enter the RESUME command. TNVT220 returns to the emulation mode and displays the screen for the session you selected.

While you are in emulation mode, you can switch from the current emulation session to the next session by pressing <Alt>+<N>. After you switch sessions, the next session opens on your screen and the session number on the TNVT220 status line is incremented to the next session number.

Checking TNVT220 Communications Status

You can display the status of TNVT220 communications characteristics by typing the following command:
STATUS <Enter>
Because many of the TNVT220 commands only request communication changes, you should confirm that your changes have occurred by checking the status before doing anything else.

Closing Sessions

While you are in TNVT220 command mode, you can close an established terminal emulation session by typing the following command:
CLOSE <Enter>
You can close a specific TNVT220 session by typing the following command:
CLOSE [ session_number | hostname ] <Enter>
If you do not specify session_number or hostname, TNVT220 closes the current session and leaves you in the TNVT220 command mode.

When you are in emulation mode, you can close a session by logging out as you normally would on the terminal you are emulating. If more than one established session is active when you log out, you are returned to the TNVT220 command mode, where you can select another session. If only one session is established when you log out, the TNVT220 utility quits and you are returned to your original DOS session.

Switching Character Modes

You can switch between ASCII and BINARY modes during an emulation session. By default, emulation sessions begin in ASCII mode. For a description of how to begin an emulation session in ASCII or BINARY mode, see "Starting TNVT220 with a Special TELNET Emulation".

During an ASCII session, the data streams exchanged between your terminal and the network include EOL characters, such as the carriage-return character. During a BINARY session, the data streams do not include EOL characters.

You can switch the character mode to ASCII by entering the following command:

ASCII [ session_number | hostname ] <Enter>
You can switch the character mode to BINARY by entering the following command:
BINARY [ session_number | hostname ] <Enter>
If you do not specify a session_number or hostname, the ASCII and BINARY commands affect the current session.

To change a terminal definition, see "Changing the General Setup Characteristics".

To specify EOL characters, see "Specifying End-of-line Sequences".

Display Options for the Characters You Type

By default, TNVT220 immediately sends the characters you type to the remote host. The remote host echoes those characters to your workstation's screen.

You can have TNVT220 send the characters you type directly to your screen by entering the following command:

CHARLOCAL [ session_number | hostname ] <Enter>
If you do not specify session_number, TNVT220 applies the command to the current session.

To have the remote host echo the characters you type, type the following command:

CHARREMOTE [ session_number | hostname ] <Enter>

TNVT220 can buffer the characters you type until you type a line terminator (a carriage return or valid escape sequence) and then send your characters to the remote host. When TNVT220 buffers characters, it sends the characters to your screen as you type them.

To have TNVT220 buffer your typed characters, type the following command:

LINEMODE [ session_number | hostname ] <Enter>

Setting the Interrupt Character

You can change the interrupt character sequence that halts a process running on a remote host and halts the output queued by the remote session. The default interrupt character sequence is ^O.

To change the interrupt character sequence, type the following command:

SETIP interrupt_sequence <Enter>
For information on specifying interrupt_sequence, see the -O option for the TNVT220 command in Table 3-1.

Specifying End-of-line Sequences

You can specify how TNVT220 translates EOL sequences that you send to or receive from the host.

The network EOL sequence is a carriage-return and line-feed pair. By default, TNVT220 translates each EOL sequence it receives as a carriage-return and line-feed pair, and translates each EOL sequence it sends as a carriage return.

TNVT220 can interpret the EOL sequences it receives as carriage returns (CR), line feeds (LF), or carriage-return and line-feed pairs (BOTH). To change the way TNVT220 interprets the EOL sequences it receives, type the following command:

RECVEOL { CR | LF | BOTH } [ session_number | hostname ] <Enter>
TNVT220 can include a carriage return (CR), a line feed (LF), or no EOL sequence (NONE) with each data sequence it sends to a host. If you specify NONE or LF, TNVT220 sends a carriage return-null sequence when you type a carriage return. To change the EOL sequence that TNVT220 sends, type the following command:
SENDEOL { CR | LF | BOTH } [ session_number | hostname ] <Enter>
Each of these commands affects the current session unless you specify another session_number or hostname.

Neither of these commands has any effect on a TNVT220 session when you set the session character type to BINARY or when you enable LINEMODE. To change the character mode from BINARY to ASCII, see "Switching Character Modes". To enable or disable the LINEMODE setting, see "Display Options for the Characters You Type".

You can also define EOL sequences when you start a TNVT220 terminal emulation session. To do this, see "Starting TNVT220 with a Special TELNET Emulation" on page 3-5.

Forcing Duplex Communications

You can force duplex communications by requesting that the server not suppress go-aheads. The server can refuse this request. If the server allows go-aheads, you can reissue your request.

To request that go-aheads not be suppressed, type the following command:

SGA [ session_number | hostname ] <Enter>

This command affects the current session unless you specify another session_number or hostname.


Defining the Terminal Emulation

The TNVT220 utility includes setup functions and screens that let you define the characteristics for the current terminal emulation. These functions enable TNVT220 to work properly with various hosts in a variety of environments.

The initial, or default, emulation characteristics are installed with your LAN WorkPlace for DOS software. The table below lists these characteristics by the setup screen on which they are listed:

Directory  Default Characteristics 
Setup Directory  OnLine 
Setup=English 
NorthAmerican Terminal 
Display Setup  InterpretControls 
StatusLineOn 
FG=White 
BG=Blue 
UL=Red 
Bold=Cyan 
Bold+UL=Magenta 
NoAutoWrap 
Cursor 
UnderlineCursorStyle 
HardwareAccess 

General Setup 
VT220-Mode,7-Bit 
VT220 ID 
UserDefinedKeysUnlocked 
UserFeaturesUnlocked 
NoLocalEcho 
NumericKeypad 
NormalCursorKeys 
NoNewLine 

Printer Setup 
Speed=4800 
PrinterPRN 
80CPL 
NormalPrintMode 
8BitsNoParity 
1StopBit 
6Lines/inchVertSpac 
PrintFullPage 
PrintNationalOnly 
NoTerminator 

Keyboard Setup 
Backspace=BS 
NoMarginBell 
WarningBell 
Break 
BellToneC 
AutoAnswerback 
AutoAnswerback= (no message) 
(Answerback message) NotConcealed 

Tab Setup 
8-ColumnTabs 

 

Each of the following sections describes how to change the characteristics for one of the Setup screens.

Changing Emulation Characteristics with the Setup Directory

All the setup functions are accessed from the Setup Directory. To access this directory, press <Alt>+<S>. The following figure shows how to use this directory:

fig3-05

After the Setup Directory opens, you can select the fields that either display other setup screens or specify changes in the terminal emulation setup. To select a field, press the arrow keys to move the cursor to the field name, then press the numeric <Enter> or <+>. If the selected field displays another setup screen, that screen replaces the Setup Directory and lists more fields for you to select. If the field offers a list of options, a new option overwrites the previous option in the field name each time you press the numeric <Enter> or <+>. All other fields represent specific actions, such as ClearDisplay or Save, which are activated when you select those fields.

On standard keyboards, press <+> to select a field; on extended keyboards, press the numeric <Enter>.

The following figure lists the actions available using the Setup Directory. Actions that require other setup screens are described at the top of the figure; actions that change the emulation are described at the bottom of the figure. fig3-06

The following table describes this screen in greater detail. The section that follows the table describes the national character sets that you can choose from the National Terminal field (shown above as "NorthAmerican Terminal").

Setup Directory Fields
Field  Values  Explanation 
Display  Select this field to switch to the Display Setup screen. That screen shows fields you can select to modify your screen display. 
General  Select this field to switch to the General Setup screen. That screen displays fields you can select to change terminal types, lock or unlock user- defined keys or user-preference features, and change character sequences. 
Printer  Select this field to switch to the Printer Setup screen. That screen displays fields that you can select to define how your terminal interacts with a printer. 
Keyboard  Select this field to switch to the Keyboard Setup screen. That screen displays fields you can select to define keyboard functions. 
Tab  Select this field to switch to the Tab Setup screen. That screen displays fields you can select to modify screen tabs. 
OnLine/Local  OnLine**, Local Select this field to switch the communication mode with the remote host. 

OnLine: Lets the workstation communicate with the remote host. 

Local: Does not let the workstation communicate with the remote host. Your keystrokes are sent to your screen only. 

ClearDisplay  Select this field to clear the emulated screen when you exit from Setup mode. 
ClearComm  Select this field to abort any escape or control sequences, clear the keyboard buffers, and exit from the print-controller mode. 
ResetTerminal  Select this field to reset most of the terminal operating characteristics to a default setting used by most application programs. Characteristics such as terminal type and user-defined keys are not affected. 
Recall  Select this field to replace all existing terminal operating characteristics with previously saved values and clear the screen. 
Save  Select this field to save the terminal operating characteristics for the current session; overwrite if necessary. This function does not save the characters-per-line setting (see Table 3-8). 
Setup  English**, Francais, Deutsch Select this field to choose the language in which to display the setup mode screens. 
Terminal  North American**, British, Belgian, Canadian (French), Danish, Finnish, German, Dutch, Italian, Swiss (French), Swiss (German), Swedish, Norwegian, French, Spanish, Multinational, ISO Latin-1  Select this field to specify the kind of national terminal (that is, the national character set) you want to emulate. All standard DEC national terminals are supported. 
Default    Select this field to replace all existing terminal operating characteristics with the default terminal characteristics (see Table 3-3). 
Exit  Select this field to exit from the setup mode and return to the TNVT220 session. Selecting this field is the same as pressing <Esc> or <Alt>+<S>. 

**indicates the default value. 

Selecting a National Terminal Type

TNVT220 lets your workstation emulate various national language terminals. Each of these national language terminals accesses a different character set for TNVT220 to display on your workstation's screen.

To change the national language character set for your terminal, move the cursor to the Terminal field and cycle through a list of character sets by pressing the numeric <Enter> or <+> repeatedly until you find the set you want.

You can see examples of each character set in the following tables: fig3-07 fig3-08 fig3-09 fig3-10 fig3-11 fig3-12 fig3-13 fig3-14 fig3-15 fig3-16 fig3-17 fig3-18

 

Changing the Display Setup Characteristics

The Display Setup screen enables you to change various operating characteristics of your workstation's screen.

To display this screen, select the Display field on the Setup Directory. The following figure calls out the tasks you can perform by selecting the fields on this screen.

fig3-19

The following table describes these tasks in greater detail and lists the options you can select.

Display Setup Screen Fields
Field Value Explanation
ToNextSetup --- Select this field to switch to the General Setup screen.
ToDirectory --- Select this field to switch to the Setup Directory screen. This is the same as pressing <Esc>.
InterpretControls InterpretControls**
DisplayControls
Select this field to set how control codes received from the remote host are handled. Control codes include carriage-return and line-feed characters.
InterpretControls:The emulator executes the action specified by all control codes.
DisplayControls:The emulator displays the control code but does not execute the specified action.
Status Line StatusLineOn**
StatusLineOff
Select this field to hide or display the screen status line. The status line is visible only if you are emulating a VT52, VT100, or VT220 terminal and if you omitted the -X option on the command line when you started TNVT220.
StatusLineOn:Displays the status line at the bottom of the screen.
StatusLineOff:Hides the status line. In this case, the remote host can use the bottom line of the screen. 
FG  White**
Black
Blue
Green
Cyan
Red
Magenta
Brown
Select this field to define foreground (FG) color on monochrome monitors or color monitors with a color adapter. On monochrome monitors, FG can be black or white only.
BG  White
Black
Blue**
Green
Cyan
Red
Magenta
Brown
Select this field to define background (BG) color on monochrome monitors or color monitors with a color adapter. On monochrome monitors, BG can be black or white only. 
UL  White
Black
Blue
Green
Cyan
Red**
Magenta
Brown
Select this field to define the color of the underlined (UL) characters on color monitors with a color adapter. Color adapters usually do not support underlining. This field is ignored by monochrome monitors. 
Bold  White
Black
Blue
Green
Cyan**
Red
Magenta
Brown
Select this field to define the color of the boldfaced characters on color monitors with a color adapter. This field is ignored by monochrome monitors. 
Bold+UL  White
Black
Blue
Green
Cyan**
Red
Magenta
Brown
Select this field to define the color of the boldfaced and underlined characters on color monitors with a color adapter. These adapters usually do not support underlining. This field is ignored by monochrome monitors. 
AutoWrap  AutoWrap 
NoAutoWrap**
Select this field to set the automatic line wrap. 
AutoWrap: Lines wider than the screen automatically continue on the next line. 
NoAutoWrap: Lines wider than the screen do not continue on the next line. Instead, the last character on the line overwrites the previous last character. 
Cursor  Cursor** 
NoCursor 
Select this field to hide or display the cursor. 
Cursor: The cursor is visible. 
NoCursor: The cursor is not visible. 
Cursor Type  Block 
Underline** 
Select this field to set the cursor type. 
Block: The cursor is shown as a solid block. 
Underline: The cursor is shown as an underline. 
Screen Access  Direct Hardware** 
ROM-BIOS 
Select this field to determine the screen mode when emulating a VT220, VT100, or VT52 terminal. If you set the terminal emulation mode to ANSI or No Emulation, DOS sends characters to the display and receives characters from the keyboard. 
Direct Hardware: The host can directly access your terminal's video adapter board. Scrolling and screen repainting are faster than in ROM-BIOS mode. However, for this mode to work, your video adapter board must be 100% compatible with a standard IBM* adapter, such as an MDA, a CGA, an MGA (such as an adapter compatible with Hercules* computers), an EGA, an MCGA, a VGA, or an 8514/A board. 
ROM-BIOS: The host can access your terminal's screen via your terminal's ROM-BIOS. Scrolling and screen repainting are slower than in direct hardware mode. However, this method works with all PC compatibles, even if they have incompatible display adapters. Use this method when running in an MS Windows 3.0 window in standard mode. 

** indicates the default value. 

 

Changing the General Setup Characteristics

The General Setup screen enables you to define terminal types, modify user-defined keys and user-preference features, and define certain keyboard sequences that you transmit to the host.

The following figure calls out the tasks you can perform with the fields on this screen.

fig3-20

The following table describes these tasks in greater detail and lists the options you can select in each field. General Setup Screen Fields
Field  Values  Explanation 
ToNextSetup  Select this field to switch to the Printer Setup screen. 
ToDirectory  Select this field to switch to the Setup Directory screen. This is the same as pressing <Esc>. 
Terminal Emulation Mode  VT220, 7-bit** 
VT220, 8-bit 
VT52 
VT100 
ANSI 
No Emulation 
Select this field to set the terminal type to emulate. 
VT220, 7-bit: Emulates a VT220 terminal using 7-bit control characters or national replacement characters. Most VT100 application programs run successfully with this setting. 
VT220, 8-bit: Emulates a VT220 terminal using 8-bit control characters or DEC multinational characters. 
VT52: Emulates a VT52 terminal. 
VT100: Emulates a VT100 terminal. This option is for application programs that require strict compatibility with a DEC VT100 terminal. 
ANSI: Does not emulate any terminal. Sends all characters to ANSI.SYS for interpretation and receives all characters from ANSI.SYS. When in ANSI mode, you can remap keyboard keys (see "Changing TNVT220 Keyboard Functions with the Key220 Utility"). To use ANSI emulation mode, include the following line in the CONFIG.SYS file 
DEVICE=ANSI.SYS 
No Emulation: Does not emulate any terminal. Reads all characters from STDIN and writes all characters to STDOUT. 
When logging into a VMS system, select VT220, VT100, or VT52. 
Mode ID  VT220 ID** 
VT100 ID 
VT101 ID 
VT102 ID 
Select this field to set how your terminal responds when a host queries for its terminal type. 
User-Defined Keys  Locked 
Unlocked** 
Select this field to determine whether the remote host can modify definitions of user-defined keys. 
Locked: Neither the host nor any applications running on it can modify the user-defined keys. 
Unlocked: Either the remote host or any applications running on it can modify the user-defined keys. 
User Features  Locked 
Unlocked** 
Select this field to determine whether the host can modify user-preference features you have set (the dark/light screen and any tab stops). 
Locked: Neither the host nor any applications running on it can modify user-preference features. 
Unlocked: Either the host or any applications running on it can modify user-preference features. Some applications expect to control these features. If so, set this field to Unlocked. 
Echo  NoLocalEcho** 
LocalEcho 
Select this field to set the echo mode to NoLocalEcho (remote) or LocalEcho. 
NoLocalEcho: All characters you type are sent to the remote host and echoed on your screen by the remote host. 
LocalEcho: All characters you type are transmitted to the remote host and also displayed on your screen. Local mode is available only if your terminal is emulating a VT220, VT100, or VT52 terminal. You must select this value when the TNVT220 echo mode is set to local (CHARLOCAL) or linemode is on. 
Keypad  Application 
Numeric** 
Select this field to determine whether the numeric keypad transmits ASCII numeric character codes or remote application escape sequences. 
Application: The numeric keypad transmits remote application escape sequences. 
Numeric: The numeric keypad transmits the ASCII character codes that correspond to the numbers on the numeric keypad. 
Cursor Keys  Application 
Normal** 
Select this field to determine whether the cursor keys transmit ANSI character sequences (cursor movement) or remote application control escape sequences. 
Application: The cursor keys transmit application control escape sequences. 
Normal: The cursor keys transmit the ANSI cursor control sequences (up, down, left, and right cursor movements). 
NewLine  NewLine 
NoNewLine** 
Select this field to determine whether TNVT220 should include line-feed characters with carriage-control characters. 
NewLine: The terminal transmits a carriage return and line feed when you press <Enter>. When the host you are logged in to transmits a carriage return, it is converted to a carriage-return and line-feed pair and displayed as such on the screen. 
NoNewLine: The terminal transmits a carriage return only when you press <Enter>; a line-feed character is not included. When the host transmits a carriage return, a line feed does not occur. When Num Lock is on, the value of the NewLine field affects both the <+> on the regular keyboard and the <Enter> on the numeric keypad. 

** indicates the default value. 

 

Changing the Printer Setup Characteristics

The Printer Setup screen enables you define how your workstation interacts with a printer attached to it.

To access this screen, select the Printer field on the Setup Directory. The figure below calls out the tasks you can perform with this screen:

fig3-21

The following table describes these tasks in greater detail and lists the options you can select in each field.

Printer Setup Screen Fields
Field  Values  Explanation 
ToNextSetup  ---  Select this field to switch to the Keyboard Setup screen. 
ToDirectory  ---  Select this field to switch to the Setup Directory screen. This is the same as pressing <Esc>. 
Transmit/ Receive Speed  110 
150 
300 
600 
1200 
2400 
4800** 
9600 
Select this field to set the baud rate at which your workstation and printer send data to each other. The speed is meaningful only if the printer port is a serial port (COM1 or COM2). If the printer port is a parallel port (LPT1, LPT2, LPT3, or PRN), TNVT220 ignores this field. 
Printer port  PRN** 
LPT1 
LPT2 
LPT3 
COM1 
COM2 
Select this field to specify the port to which the printer is attached. The default printer port is PRN, which is normally the same as LPT1. 
PRN, LPT1, LPT2, and LPT3 are parallel ports; COM1 and COM2 are serial ports. 
Characters per Line (CPL)  80** 
132 
Select this field to set the number of characters the printer can print on one line. This field is meaningful for parallel (LPT and PRN) ports only. The default value is 80 characters per line. This field's value is not saved by the Setup Save command. Each time you start TNVT220, the value is set to 80 characters per line. 
Print Mode  Normal** 
Auto 
Controller 
Select this field to set the printer operating mode. 
Normal: You can start print functions from the keyboard. 
Auto: The current line of text is printed when the host sends a line feed, form feed, or vertical tab code. 
Controller: All data sent by the host is printed on the printer without being displayed on the screen. 
Data Bits/Parity  8 bits, no parity** 
8 bits, even parity 
8 bits, odd parity 
7 bits, no parity 
7 bits, even parity 
7 bits, odd parity 
Select this field to set the character format used by the printer port. Select the option that corresponds to the printer character width (either 7 bits or 8 bits) and to how the printer handles parity (even, odd, or no). This field is meaningful for serial printer ports (COM) only. If the printer port is set to parallel (LPT or PRN), TNVT220 ignores this field. 
Stop Bits  1** 
Select this field to set the number of stop bits. This value should match the number used by the printer. This field is meaningful for serial printer ports (COM) only. If the printer port is set to parallel (LPT or PRN), TNVT220 ignores this field. 
Lines/Inch  6** 
Select this field to set how many lines the printer prints in 1 inch. You can set this characteristic for parallel ports (LPT and PRN) only. This field's value is not saved by the Setup Save command. Each time you start TNVT220, the value is set to 6 lines per inch. 
Print Page Region  PrintFullPage** 
PrintScrollRegion 
Select this field to set how much of the screen is to be printed. 
PrintFullPage: Print all the text currently on the screen's page. 
PrintScrollRegion: Print only the text in the scrolled portion of the screen. 
Printed Character Type  PrintNationalOnly** 
PrintNational and LineDrawing 
PrintMultinational 
Select this field to set the type of characters to be sent to the printer. 
PrintNationalOnly: Print the standard ASCII characters. 
PrintNationalandLineDrawing: Print the standard ASCII characters plus the line-drawing characters. 
PrintMultinational: Print standard ASCII and 8-bit characters. You should select this value only when your printer supports the DEC extended character set. 
Print Terminator  FF 
NoTerminator** 
Select this field to send or not send a terminator at the end of a page print operation. 
Terminator=FF: Send a form feed as the print terminator. 
NoTerminator: Do not send any characters after printing concludes. 

** indicates the default value.

 

Changing the Keyboard Setup Characteristics

The Keyboard Setup screen enables you to define the operating characteristics of your keyboard.

To access the Keyboard Setup screen, you select the Keyboard field on the Setup Directory. The figure below calls out the tasks you can perform with this screen.

fig3-22

The table below describes these tasks in greater detail and lists the options you can select with each screen field.

Keyboard Setup Screen Fields
Field  Values  Explanation 
ToNextSetup  ---  Switch to the Tab Setup screen. 
ToDirectory  ---  Switch to the Setup Directory screen. This is the same as pressing <Esc>. 
Backspace  Backspace = BS** 
Backspace= DEL 
Select this field to set the function of the Backspace key (the left-arrow key above <Enter> on most keyboards) to backspace or delete. 
Backspace = BS: <Backspace> moves the cursor one space to the left without deleting the character at the cursor. 
Backspace = DEL: <Backspace> moves the cursor one space to the left, deleting the character at the cursor. 
MarginBell  MarginBell 
NoMarginBell** 
Select this field to set the function of the margin bell. 
MarginBell: A bell sounds when you move the cursor to column 72. 
NoMarginBell: No bell sounds. 
WarningBell  WarningBell** 
NoWarningBell 
Select this field to set the function of the warning bell. 
WarningBell: A bell sounds when the workstation receives an operating error or when you press <Ctrl>+<G>. 
NoWarningBell: No bell sounds. 
Break  Break** 
NoBreak 
Select this field to set the break-key function. 
Break: Pressing <Ctrl>+<Break> sends the answerback message, if one is set. Pressing <Shift>+<Ctrl>+<Break> exits from the TNVT220 session. This is equivalent to pressing the VT220 break key. 
NoBreak: Pressing <Ctrl>+<Break> has no effect. Pressing <Shift>+<Ctrl>+<Break> exits from the TNVT220 session. 
Bell Tone  C** 






Select this field to set the bell tone. A full octave is available. As you progress through the tones, they sound so that you can hear them before deciding. 
AutoAnswerback  AutoAnswerback** 
NoAutoAnswerback 
Select this field to determine whether the application automatically sends an answerback message when you establish a connection. The answerback message is always sent when you press <Ctrl>+<Break> if the Break function is set to On. 
AutoAnswerback: The application automatically sends an answerback message to the remote host after you establish a connection. 
NoAutoAnswerback: The application does not send an answerback message to the remote host after you establish a connection. 
Answerback  ---  Select this field to set the answerback message sent when the computer receives an ENQ signal or when you type <Ctrl>+<Break>. When an ENQ is received, the answerback message is sent to the remote host without affecting the data on your screen and without requiring additional action from you. 
The answerback message can be up to 30 characters long. It can contain any characters, including control characters such as the line-feed and carriage-return characters. The message can be a command to execute on the remote host, or it can be text. After you enter an answerback message, press either <+> or the numeric <Enter> to terminate the message. By default, there is no answerback message. You can conceal the answerback message by setting the Conceal Answerback field appropriately. 
Conceal  Concealed 
NotConcealed** 
Select this field to determine whether the application displays an answerback message on the screen. 
Concealed: The application does not display an answerback message on the screen. Instead, the word "Concealed" is displayed in the Answerback field. Once you have concealed an answerback message, it never can be revealed. To reset this field to NotConcealed, either enter another answerback message or move to the Answerback field and press either <+> or the numeric <Enter> twice. The previous answerback message is lost. 
NotConcealed: The application displays an answerback message on the screen. 

** indicates the default value.

 

Setting Tabs

The Tab Setup screen enables you to change the tabs your screen uses to display information.

To set your own tabs, follow the instructions illustrated below:

fig3-23


Executing DOS Commands

You can suspend a TNVT220 emulation session or the TNVT220 command mode to run DOS commands or programs.

TNVT220 returns you to the drive and directory where you started or last suspended TNVT220, and starts a new DOS session. You can now run DOS commands.

Note:   Suspending TNVT220 and displaying the DOS prompt starts a new DOS session. If you use the DOS SET command while a TNVT220 session is suspended, the characteristics you set affect only the current DOS session. When you quit TNVT220 and return to the DOS prompt, TNVT220 restores all SET characteristics to the values set when you started the application.

When you finish running the DOS commands and are ready to resume the TNVT220 emulation or command mode, type the following command:

EXIT <Enter>
TNVT220 exits the DOS session and resumes the session or mode that you suspended.

When you quit the TNVT220 utility, you are returned to the DOS session from which you started the TNVT220 utility. Changes made to other DOS sessions started while TNVT220 was suspended do not affect the original DOS session.


Changing the Default Transport Type

When you start the TNVT220 utility, it runs the TelAPI utility. The TelAPI utility loads TELNET and NVT modules, which enable TNVT220 to emulate TELNET and NVT sessions. If both modules are available for TelAPI to load, TelAPI loads both but uses the TELNET module for its default setups. If you open an emulation session when you start TNVT220, or if you use the OPEN command to start TNVT220, TNVT220 assumes you are opening a TELNET session.

You can change the default transport type by adding a DOS SET instruction to your AUTOEXEC.BAT file to change the TelAPI transport environment. This instruction overrides the default TelAPI setup. The following table describes the instructions you can include in the AUTOEXEC.BAT file to change the default emulation setup.

TelAPI Transport Commands for the AUTOEXEC.BAT File
TelAPI Environment Command  Description 
SET TELAPI_XPORT=NVT,TELNET  TelAPI assumes you are opening an NVT session unless you use the TELOPEN command at the TNVT220 prompt. 
SET TELAPI_XPORT=NVT  TelAPI opens only NVT sessions. You cannot use the TELOPEN command. This setup saves 20K in space otherwise used to load the TELNET module. 
SET TELAPI_XPORT=TELNET  TelAPI opens only TELNET sessions. You cannot use the NVTOPEN command. This setup saves 20K in space otherwise used to load the NVT module. 
SET TELAPI_XPORT=TELNET,NVT  TelAPI assumes you are opening a TELNET session unless you use the NVTOPEN command at the TNVT220 prompt. This setup is the default setup used by TelAPI when you do not include a TELAPI_XPORT command in the AUTOEXEC.BAT file. 

 


Switching Cursor Modes

You can control whether the cursor inserts characters from the host into an existing line of text or replaces existing characters with new characters from the host.

By default, the TNVT220 cursor is in replacement mode, as indicated on the status line of the startup screen. You can change from one mode to the other by sending an escape sequence from the remote host to TNVT220. The escape sequences are listed in below:
Terminal Type  Insert Mode  Replace Mode 
VT100, VT220 7-bit  Esc [4h  Esc [4l 
VT220 8-bit  CSI 4 h  CSI 4l 

You can change modes by creating a file for the escape sequence and executing the file. For example, with TNVT220 set for VT220 7-bit or VT200 emulation of a UNIX host, you could type the character sequence

^[[4h
in a file named setins, where ^[ (typed as <Ctrl>+<V> then <Esc>) is equivalent to the escape function. You could also type the character sequence
^[[4l
in a file named setrep. To change the cursor mode to insert, enter the following command at the UNIX prompt:
cat setins <Enter>

To change the cursor mode to replace, enter the following command:

cat setrep <Enter>

 

3.  Changing TNVT220 Keyboard Functions with the Key220 Utility

TNVT220 enables you to map your workstation keys to VT220 keyboard or TNVT220 functions (VT220 functions). You can map your PC keys to VT220 functions not normally available on your keyboard. You can also define new VT220 functions by programming the VT220 user-defined keys.


Remapping PC Workstation Keys

You change the way your keyboard is mapped by editing a mapfile and using the KEY220 utility to compile the file. Once you compile the file, you can load the binary file into a TNVT220 terminal emulation session. (For information on loading the mapfile, see "Defining the Terminal Emulation".)

The LAN WorkPlace software provides the following map files for use with TNVT220: ENHMAP.TXT, EXTMAP.TXT, and REGMAP.TXT. The ENHMAP.TXT and EXTMAP.TXT files map VT220 function keys to the enhanced 101-key or 102-key PC keyboard. The REGMAP.TXT file maps VT220 keys to the standard 83-key or 84-key PC keyboard.

Editing a Key Mapping File

Each mapfile you use with TNVT220 exists in two forms: a source text file that you can edit with most editors, and a compiled (binary) file. Both the source file and the compiled file usually have the same name, but the compiled file has a .BIN extension, while the source file has a .TXT file extension.

A source file includes comment lines (lines of text preceded by the # symbol) and mapping assignments (lines associating VT220 keys to PC keys). Each mapping assignment has the following format:

VT220_function_key = pc_key_sequence [,...];
Note: Mapping assignments can include spaces, tabs, dashes, and blank lines. The KEY220 compiler ignores these items.

The following table describes the fields that make up this command.

Mapping Assignment Fields

Field Description 
VT220_function_key  This is a VT220 function key or TNVT220 function. VT220 functions can be accessed by their function names, listed in Table 3-13. 
No two VT220 functions can be associated with the same pc_key_sequence. 
pc_key_sequence  This is the sequence of keys you must press to access a VT220 function. If the sequence of keys includes more than one key, you must press all keys at the same time. You can include the sequence of keys in any order. The sequence can include keys listed in Table 3-15. 
When more than one pc_key_sequence accesses the same VT220 or TNVT220 function, the sequences are separated by commas.

You can use the following procedure to change the PC keys mapped to a VT220 function:

  1. Open the source file with an editor.

  2. Move the cursor to the line you want to edit.

  3. Replace the text for the original PC_key_sequence with the text that identifies the PC_key_sequence you want to map to the VT220 function also listed on the line.

  4. To change the mapping for other keys, repeat steps 2 and 3.

  5. Save the mapfile.

Before you can use the new assignment, you must compile the source file. For instructions on compiling files, see "Compiling a Mapfile with KEY220".

For example, you could edit the EXTMAP.TXT file to change your workstation's key sequence for starting the TNVT220 command mode (the TNVTGate function) from <Alt><+T> to <F5>. Use the following procedure to do this:

  1. Open the EXTMAP.TXT file with an editor that can modify and save ASCII text. For example, if you are using the EDLIN editor, type the following command:
    EDLIN EXTMAP.TXT <Enter>
    
  2. Find the TNVTGate line.
    TNVTGate = Alt t
    
  3. Replace the Alt t with F5.
    TNVTGate = F5
    
  4. Save the text file.

The EXTMAP.TXT file is ready for you to compile.

 

Mapping VT220 Functions

The following table lists the VT220 keyboard and TNVT220 functions that you can map to your PC AT/XT and PC Enhanced keyboard keys. Mappable VT220 and TNVT220 Functions
VT220 Keyboard Functions  TNVT220 Functions 
F6 to F20  DOSGate 
Shift-F6 to Shift-F20  TNVTGate 
Print Screen  vi - LineHome 
Setup  vi - LineEnd 
Find  vi - ScreenHome 
Insert Here  vi - ScreenEnd 
Select  vi - Middle 
Remove  vi - PgUp 
Prev Screen  vi - PgDn 
Next Screen  vi - FileEnd 
Up Arrow  vi - Ins 
Down Arrow  Auxiliary Keypad / 
Left Arrow  Auxiliary Keypad * 
Right Arrow  Auxiliary Keypad + 
PF1 to PF4   
NextSession   
F6 to F20   
Delete   
Auxiliary Keypad 0 to 9   
Auxiliary Keypad .   
Auxiliary Keypad -   
Esc   

You cannot remap all of the VT220 function keys because some are already permanently mapped to your PC keys. The next table lists these keys and the corresponding PC keys to which they are mapped:

Permanently Mapped VT220 Function Keys
VT220 Function Key PC Keyboard Key 
Hold Screen  Scroll Lock 
<Ctrl>+<Break>  <Ctrl>+<Break> 
Break  <Shift>+<Ctrl>+<Break> 

Mapping IBM PC Keyboard Keys

The following table lists the IBM PC AT/XT and Enhanced keyboard keys that you can map to VT220 function keys.

Mappable IBM PC Keys
AT/XT Keys  Enhanced Keys 
<F1> to <F10>  <F1> to <F12> 
<Shift>+<F1> to <Shift>+<F10>  <Shift>+<F1> to <Shift>+<F12> 
<Ctrl>+<F1> to <Ctrl>+<F10>  <Ctrl>+<F1> to <Ctrl>+<F12> 
<Alt>+<F1> to <Alt>+<F10>  <Alt>+<F1> to <Alt>+<F12> 
<Shift>+<Alt>+<F1> to <Shift>+<Alt>+<F10>  <Shift>+<Alt>+<F1> to <Shift>+<Alt>+<F12> 
<Ctrl>+<Alt>+<F1> to <Ctrl>+<Alt>+<F10>  <Ctrl>+<Alt>+<F1> to <Ctrl>+<Alt>+<F12> 
<Alt>+<0> to <Alt>+<9>  <Alt>+<0> to <Alt>+<9> 
<Alt>+<A> to <Alt>+<Z>  <Alt>+<A> to <Alt><Z> 
<Home>  <Home> (Edit Keys) 
<End>  <End> (Edit Keys) 
<PgUp>  <PgUp> (Edit Keys) 
<PgDn>  <PgDn> (Edit Keys) 
<Ins>  <Insert> (Edit Keys) 
<Del>  <Delete> (Edit Keys) 
Up Arrow  Up Arrow (Cursor Keys) 
Down Arrow  Down Arrow (Cursor Keys) 
Right Arrow  Right Arrow (Cursor Keys) 
Left Arrow  Left Arrow (Cursor Keys) 
  <Home> (Numeric Keys) 
  <End> (Numeric Keys) 
  <PgUp> (Numeric Keys 
  <PgDn> (Numeric Keys) 
  <Ins> (Numeric Keys) 
  <Del> (Numeric Keys) 
  Up Arrow (Numeric Keys) 
  Down Arrow (Numeric Keys) 
  Right Arrow (Numeric Keys) 
  Left Arrow (Numeric Keys) 
  <Esc> 
  <Shift>+Numeric Keypad <0> to <Shift>+Numeric Keypad <9> 
  <Shift>+<Numeric Keypad .> 
  <Shift>+<Numeric Keypad -> 
  <Shift>+<Numeric Keypad *>


Compiling a Mapfile with KEY220

You can compile a source mapfile into binary code by typing the following command:
KEY220 input_file [output_file] <Enter>
The following table describes the parameters you use with this command:

KEY220 Command Parameters
Item Description
input_file  This parameter is the filename and file extension of a text file containing ASCII text that maps your PC workstation keys to VT220 functions. 
output_file  This parameter is the filename and file extension you want assigned to the compiled file. This file can be loaded into a TNVT220 session to map your workstation's keys. 
Omit this filename from the KEY220 command if you want output_file to have the same name as input_file. KEY220 assigns the .BIN extension to compiled files. 

For example, you can use the following procedure to prepare the EXTMAP.TXT file so that you can load it with a TNVT220 session:

Change the current directory to \NET\HSTACC by typing the following command:

CD \NET\HSTACC <Enter>
TNVT220 expects to find your source and map files in the \NET\HSTACC directory.

Compile the EXTMAP.TXT file with the KEY220 utility by typing one of the following commands:

KEY220 EXTMAP.TXT <Enter>
or
KEY220 EXTMAP.TXT EXTMAP.BIN <Enter>
The first command lets the KEY220 utility assign the same filename and attach the .BIN file extension. The second command specifies the filename and extension for the binary file.

You can now use the modified EXTMAP.BIN file with TNVT220. For information on loading mapfiles into TNVT220 emulation sessions, see "Starting TNVT220 with a Special TELNET Emulation".


Programming VT220 User-Defined Keys

You can add 15 of your own functions to the VT220 keyboard by programming functions for the VT220 user-defined keys. These keys extend the functionality of the VT220 keyboard so that you can execute long, commonly used commands by merely pressing the workstation keys mapped to them. To map the VT220 user-defined keys to keys on your PC workstation, see "Editing a Key Mapping File" on page 3-63.

You define functions for the user-defined keys in a UNIX file that you name and store on the remote host. This file contains device control strings (DCSs) that define functions for the user-defined keys. Run this file whenever you want to activate a set of functions for the VT220 user-defined keys.

The following figure describes the DCS format you use to define the VT220 user-defined keys: fig3-24

The following table describes each DCS field and defines your options:

Device Control String Fields and Elements
Item Description
Device Control String Introducer This field precedes the DCS. Everything between this field and the String Terminator is the DCS.
To introduce the DCS to a 7-bit environment, type "EscP" (Hex 1B 50) in this field; to introduce the DCS to an 8-bit environment, you include the equivalent of the DCS character (Hex 90). 
Clear Parameter  Use this parameter to indicate whether you want to clear all current user- defined key functions or a specific user-defined key function.
To clear all the user-defined key functions, type a 0 (zero) as the clear parameter. To clear just the user-defined key function that you specify in the DCS statement, type a 1. 
Usually, you type a 0 (zero) as the clear parameter in your first DCS statement. This clears all previously programmed user-defined keys so that you can provide new definitions for all the definable keys. You type a 1 for subsequent DCS statements so that you do not clear the functions that you just defined. 
Lock Parameter  This parameter locks or unlocks the user-defined keys from being redefined by applications running on the remote host. This parameter protects the user- defined keys in the same manner as the Lock/NoLock UserDefinedKeys function on the TNVT220 General Display. 
To lock the user-defined keys so that they cannot be redefined by the host applications, type a 0 (zero). To unlock the keys, type a 1. 
Final Character  The vertical bar (7C Hex) separates the DCS setup information from the key definition(s). 
User-defined Key Selector Number  This field specifies, with a selector number, the user-defined key you are programming. To determine the selector number that identifies a key, refer to Table 3-18. 
User Function  This field specifies the function you are associating with a user-defined key. To specify the function, you type it in hexadecimal characters. 
If you need to include a carriage-return character at the end of a function, include it as CR (0D Hex). 
Additional User-defined Keys and Functions  You can define multiple user-defined keys by separating their definitions with a semicolon. For example, you could define three keys as follows: 
key1/function1; key2/function2; key3/function3 
String Terminator  This field ends the DCS statement. 
For a 7-bit environment, type "Esc\" (1B 5C Hex); for an 8-bit environment, you include the equivalent of the ST character (9C Hex).

 

This next table lists the selector numbers that specify VT220 User-defined keys in a device control string:

User-defined Key Selector Numbers
VT220 User-Defined Key Selector Number
<Shift>+<F6>  17 
<Shift>+<F7>  18 
<Shift>+<F8>  19 
<Shift>+<F9>  20 
<Shift>+<F10>  21 
<Shift>+<F11>  23 
<Shift>+<F12>  24 
<Shift>+<F13>  25 
<Shift>+<F14>  26 
<Shift>+<F15>  28 
<Shift>+<F16>  29 
<Shift>+<F17>  31 
<Shift>+<F18>  32 
<Shift>+<F19>  33 
<Shift>+<F20>  34 

 

The following figure shows a sample file with DCS defining user-defined key functions. fig3-25

 

Editing a User-Defined Key File

Follow these steps to create a file that defines functions for the VT220 user-defined keys:
  1. Open a UNIX file with an editor.

  2. You can use any editor, such as vi, that can open a file, alter text, and save the file.

  3. Insert the DCSs that define functions for all the VT220 user-defined keys.

  4. Refer to Table 3-17 for information on DCS fields.

  5. Include a function for each user-defined key. If you do not have functions for some keys, include the NULL function with those keys.

  6. You can include comments after the string terminator. The remote host considers anything outside the DCS introducer and string terminator to be a comment.

  7. Save the file.

You can now load your user-defined key functions.

Loading User-Defined Key Functions

You can activate a set of user-defined key functions by loading their device control strings into standard output (STDOUT). To do this, type the following command:
cat setudks <Enter>
These functions remain active until you either end the UNIX session or activate another set of user-defined key functions.

If you want these functions to be active whenever you start a UNIX session, include the above command in the .cshrc file.


Mapping ANSI Keys to PC Keys

You can remap your workstation keys for TNVT220 emulation setup in ANSI mode. This enables you to redefine the meanings of some of your keyboard keys to perform functions that are useful on or recognized by a non-VT220 remote operating system.

To do this, you must alter the keyboard assignments in a file called KBDDATA, which is located in your \NET\HSTACC directory. This file translates each character you send from your keyboard into a character or an executable character sequence for the remote operating system.

The following figure identifies the elements of ANSI keyboard assignment statements within the KBDDATA file.

fig3-26

The following table describes how to use each of the fields within these statements.

Keyboard Assignment Formats
Format Field Pairs Description
First code1;code2 The key represented by code1 is mapped to the key represented by code2. 
You type ASCII character numbers (decimal format) for the characters you are mapping. For example, type 65;81 to map the letter A to the letter Q. 
Second  code1;code2  code1 is always 0 (zero). 
code2 represents the key you are mapping to another key. 
You type extended ASCII character numbers (decimal format) in the code2 field for the character you are mapping. 
  code3;code4  code3;code4 represent the key to which you are mapping the key represented by code1;code2. 
You type ASCII or extended ASCII character numbers (decimal format) for code3 and code4. You can also type a character string within quotes ("") for code3.

 

For example, you map the A key (ASCII 65) to the Q key (ASCII 81) using a first format assignment:

[65;81p#
When you press <A> with this assignment in effect, your terminal sends a Q to the remote host.

You can also map the F10 key (extended ASCII 0;68) to the directory function ("dir";13) using a second format assignment:

[0;68;"dir";13p#
When you press <F10> with this assignment in effect, your terminal sends the dir <Enter> command to the remote host.

The KBDDATA file is divided into two parts: the first part assigns keys while you are using the TNVT220 utility, and the second part assigns keys while you are not using the TNVT220 utility. The two parts are separated by a line that contains only a "%#" character pair.

 

4.  Running Third-party Emulators with TSU

The TELNET Session Utility (TSU) lets your third-party, LAN-compatible data-communications application use the TelAPI utility. When using TelAPI, your application can communicate with a remote host running a TELNET server program.

You open and close TELNET sessions with a remote host by specifying TSU options. Specify these options by either including them as parameters with the TSU command when starting TSU or selecting them from the TSU menus while TSU is running.

You do not need to use TSU if your third-party application uses the NASI Extended network interface. This interface allows your application to choose a session by name if you specify a file that lists these sessions when you start TelAPI. Your application can then choose a session name and connect to the associated host.

The following sections describe how you can use TSU to start and end TELNET sessions for your third-party terminal emulation software. Read further if you need to know how to configure these sessions and start these sessions with a batch file.


Starting an Emulation Session

To start a third-party terminal emulation application, you first run the TelAPI utility to load the TELNET Application Programming Interface into DOS memory and assign the number of TELNET sessions you are going to establish.

When TelAPI is running, run TSU to provide your software with an interface to TelAPI. When TSU begins, it displays an introductory screen with instructions to press any key. After you press a key, TSU displays the Sessions screen shown in the following figure. Use this screen to set up and close sessions with remote hosts.

After you set up a session with TSU, exit TSU and start your third-party emulation software.

fig3-27

Follow these steps to run a third-party terminal emulator:

  1. Load TelAPI by typing the following command at the DOS prompt:
    TELAPI -SN sessions <Enter>
    

    Type a number for sessions that is equal to or greater than the number of terminal emulation sessions you are opening. You can type a number between 1 and 10.

  2. Start TSU by typing the command:
    TSU <Enter>
    

    The TSU introductory screen opens.

  3. Press any key to begin using TSU.

    The TSU Sessions screen opens.

  4. Press <F3> (the Open function key) to open a session with a remote host.

    The system prompts you for the name of the remote host.

  5. Type the name of the remote host and press <Enter>.

    The system prompts you for a session ID.

  6. Press <Enter> to accept the default value, or type a session ID and press <Enter>.

    The system prompts you for the port number.

  7. Press <Enter> to accept the default port number, or type a port number and press <Enter>.

  8. Specify a remote port number only if you know that the TELNET server on the remote host is not using the default TELNET TCP port.

    The third-party emulator must be configured to access the port associated with the TSU session.

    TSU opens the session with the remote host and attaches the session to a port. (TSU automatically attaches the first session to the COM1: port, the second to the COM2: port, and so on.)

  9. Press <F10> (the Exit function key) to exit TSU.

  10. Enter the name of the emulator program at the DOS prompt.

    You have started a TELNET session with a third-party terminal emulator.


Ending Emulation Sessions

To end a session with a third-party terminal emulator, log out of the remote host at the terminal emulator prompt. When you do this, TelAPI should automatically close that TSU session.

If the session does not close, you must start TSU by entering the following command at the DOS prompt:

TSU <Enter>
When TSU displays the Sessions screen, press <F4> (Close). TSU prompts you to confirm that you want to close the session. Press <Y> to close the session.

To end all active sessions with third-party terminal emulators, press <F7> (Reset). TSU prompts you to confirm that you want to reset the sessions. Press <Y> to close the sessions.

After you close one or more sessions, you can use TSU to unload TelAPI by pressing <F8>. TSU prompts you to confirm that you want TSU to unload TelAPI. Press <Y> to unload TelAPI.

If you unload TelAPI, you must exit TSU before you can reload TelAPI.


Configuring an Existing Emulation

You can change the configuration of a terminal emulation with the Configuration screen as shown:

fig3-28

Follow these steps to change the configuration:

  1. From the Sessions screen, press <F5> (the Config function key).

    TSU replaces the Sessions screen with the Configuration screen.

  2. Move the cursor to a parameter on the Configuration Menu by pressing the Up- or Down-arrow key.

    The parameter is highlighted by the cursor.

  3. Change the value of the parameter by either pressing <F2> or editing its value in the Edit Box.

    Some of the parameters display a value you can edit in the Edit Box; others change their displayed value when you press <F2> (Toggle) to cycle through their set values.

  4. Press either <F3> (Done) to save your changes or <F4> (Abort) to clear your changes from memory.

    TSU returns to the Sessions screen.


Changing Ports

You can change the port from which TSU redirects output with the Sessions screen. Follow these steps to do this:
  1. Press <F6> (Attach).

    TSU lists the serial ports you can select.

  2. Select a port by pressing the Up- or Down-arrow key.

    The port name is highlighted.

  3. Press <Enter>.

    The port name is listed with your session on the Sessions List.


Starting a Session from a Batch File

Optionally, you can call TSU from a batch file. Example 3-1 shows a sample batch file that opens one TELNET session and then starts a third-party terminal emulator:

Sample Batch File That Opens a TELNET Session

ECHO OFF
REM LOAD TELAPI WITH ONE TELNET SESSION
TELAPI -SN1
REM OPEN A SESSION TO THE HOST ACCTG WITH HOSTID A1
TSU -O ACCTG1 A1
IF ERRORLEVEL 1 GOTO OPEN_ERROR
REM ATTACH HOSTID A1 TO COM3
TSU -A A1 COM3
IF ERRORLEVEL 1 GOTO ATTACH_ERROR
REM START THIRD-PARTY TERMINAL EMULATOR
PROGRAM_NAME
REM CLOSE THE SESSION
TSU -C A1
IF ERRORLEVEL 1 GOTO CLOSE_ERROR
REM UNLOAD TELAPI
TELAPI -U
GOTO EXIT
REM
:OPEN_ERROR ECHO OPEN SESSION FAILED
GOTO EXIT
:ATTACH_ERROR
ECHO ATTACH TO COM3 FAILED
GOTO EXIT
:CLOSE_ERROR
ECHO CLOSE SESSION FAILED :EXIT

 

Top    

Previous:    Displaying User Information

Next:    Transferring Files