Compaq TCP/IP Services for OpenVMS
User's Guide


Previous Contents Index

4.12.8.1 Associated Documentation

For additional information about TN3270 key functions, see the following IBM documents:

4.12.9 Redefining Your Keyboard

You can reassign functions and keys.

4.12.9.1 Functions You Can Redefine

You can redefine the following functions:

4.12.9.2 Keys You Can Define

The keys you can define are listed in Table 4-6.

Table 4-6 Definable Keys for TN3270
Type of Key Key Name
Function keys
(VT100 and VT200)
PF1 through PF4
   
Application keys
(VT100 and VT200)
KP0 through KP9
ENTER
MINUS
COMMA
PERIOD
   
Top-row function keys
(VT200)
F6 through F20
HELP (F15)
DO (F16)
   
Editing keypad (E1 through E6)
(VT200)
FIND (E1)
INSERT_HERE (E2)
REMOVE (E3)
SELECT (E4)
PREV_SCREEN (E5)
NEXT_SCREEN (E6)
   
Cursor keys
(VT100 and VT200)
UP
DOWN
LEFT
RIGHT
   
Control keys
(VT100 and VT200)
Ctrl/A through Ctrl/Z, including:

Ctrl/H (BS)
Ctrl/I (HT)
Ctrl/J (LF)
Ctrl/M (CR)

Excluding:

Ctrl/Y---Interrupt
Ctrl/C---Cancel/interrupt
Ctrl/O---Output off/on
Ctrl/S---Suspend output
Ctrl/Q---Resume output

4.12.9.3 Keys You Cannot Define

You cannot redefine the following keys, which are reserved to Compaq:

4.12.9.4 Redefining Keys

To redefine a keyboard key, use either of the following methods:

The following example establishes a TELNET/TN3270 connection to host JUNCO. By default, the terminal functions as if it were an IBM-3278-2 model terminal. It uses your customized keyboard definition file NEW_KEYS.DAT.


$ TN3270 JUNCO /KEY_DEFINITION=NEW_KEYS.DAT 

4.12.9.5 Creating a Key Definition File

Use the DEFINE/KEY and DELETE/KEY statements to create your own key definition file, as described in the following sections.

DEFINE/KEY Statement

The DEFINE/KEY statement assigns a new function to a particular key. Use the following syntax for the statement:


DEFINE/KEY [/STATE=EXTEND] key_name function 
/STATE Optional. Default: nonextend mode.
Redefines the key in extend mode.
key_name Standard key name on the Compaq keyboard.
function TN3270 function you want mapped to this key.

You can define most of the named keys both in normal (nonextend) mode and in extend mode.

You can define the control keys (and the synonyms for them) in normal mode only. Do not specify the qualifier /STATE=EXTEND.

The following example assigns the EXIT function to the key sequence EXT + Z :


$ DEFINE/KEY/STATE=EXTEND "Z" EXIT 

DELETE/KEY Statement

The DELETE/KEY statement removes the function assigned to a particular key. Use the following format:


DELETE/KEY [/STATE=EXTEND] key_name 
/STATE Optional. Default: nonextend mode. Deletes the key in extend mode.
key_name Standard key name on the Compaq keyboard.

Example:

The following example removes the default value of EXIT from Ctrl/Z.


$ DELETE/KEY [Ctrl/Z] 

Key Definition File: Example

By default, TN3270 maps 3270 functions to the numeric keypad.

The following example shows key definition statements in a key definition file. The definitions restore the numeric keypad on a VT220 keyboard.


DEFINE/KEY     KP0 "0" 
DEFINE/KEY     KP1 "1" 
DEFINE/KEY     KP2 "2" 
DEFINE/KEY     KP3 "3" 
DEFINE/KEY     KP4 "4" 
DEFINE/KEY     KP5 "5" 
DEFINE/KEY     KP6 "6" 
DEFINE/KEY     KP7 "7" 
DEFINE/KEY     KP8 "8" 
DEFINE/KEY     KP9 "9" 
DEFINE/KEY     period "." 
DEFINE/KEY     comma "," 
DEFINE/KEY     minus "-" 
DEFINE/KEY     Select extend 
DEFINE/KEY     Prev_screen reset 

This example restores the key normally associated with the EXT function (KP.) as the keypad decimal point. When you assign a key another function, you remove its default value. Therefore, because some TN3270 functions rely on an EXT function, the EXT function is defined to correspond to the Select key. This example also restores the key normally associated with the RESET function (KP0) as the keypad 0 key. The example then defines the RESET function to correspond to the Prev Screen key.

4.12.9.5.1 Interactive Definitions: DEF KEY Function

Use the DEF KEY function to define or redefine a key interactively. Your new definition exists until you log out from the remote host or disconnect from it.

When you invoke the DEF KEY function, TN3270 displays a prompt in the status line at the bottom of your screen.

Example:

The following example shows the use of DEF KEY to define a key. You invoke the DEF KEY function by entering the Ctrl/K sequence, after which you are prompted for the key you want to define and the function to assign to that key.


[Ctrl/K] 
Press the key that you want to define: 
 
Enter the function name or quoted character: 

You can also use DEF KEY to remove an assigned function. A null reply to the following prompt removes the definition currently in effect for that key:


Enter the function name or quoted character: 

What you enter during the DEF KEY dialog is subject to translation from the National Character Set to the Compaq Multinational Character Set.

You cannot redefine a key that exists on your National Character Set terminal if it lacks a Compaq Multinational Character Set equivalent.

4.12.9.6 TN3270 Problem Solving

During a TELNET session in which you have invoked TN3270, you might experience the following problems:

Problem

Solution for a VT100-Series Terminal

Use Set-Up mode to verify that your terminal is in ANSI mode. Enter the following command:


$ SET TERMINAL /INQUIRE 

Solution for a VT200-Series Terminal or a Terminal Connected to Either a Personal Computer or a Workstation

  1. Use Set-Up mode to verify that your terminal is:
  2. Check the Communications Menu:
    The terminal communications line must be set for 8-bit characters. To check, enter the following command:


    $ SET TERMINAL /INQUIRE 
    

Solution for a Terminal with a National Language Keyboard

Ensure that your terminal is set up to correspond to your keyboard.

Problem

You receive a message indicating that the screen size (or the alternate screen size) specified by the remote host is too big.

Solution

Use Set-Up mode to change to a valid screen size (see Section 4.12.1).

Problem

You try to use the RECORD or PLAY function, but you get an error message indicating that you have a bad key-sequence file.

Solution

The file that stores the recorded key sequence is incompatible with the current version of the software or is corrupted.

Ask your system manager to do either of the following:

4.12.10 Debugging Application Programs Using the IBM 3270 Model Terminal Emulator

Visible attribute mode provides a way to debug application programs. After you use the DSP ATT (display attributes) function to enable visible attribute mode, all attribute characters are visible. Attribute characters are characters that appear at the start of a field to indicate the following information:

The following information shows:

4.12.10.1 Entering and Exiting Visible Attribute Mode

The displays described in this section rely on your terminal's ability to produce reverse video and bold characters.

Invoking the DSP ATT function toggles in and out of visible attribute mode.

4.12.10.2 Visible Attribute Mode Displays

The attribute characters are displayed in reverse video, bold symbols. Attribute characters indicating numeric fields are also underlined. All other characters are displayed normally. Table 4-7 lists the attribute characters and their meanings.

Table 4-7 Displays in Visible Attribute Mode
Character Meaning
n Unprotected field with normal intensity follows.
N Protected field with normal intensity follows.
d Following unprotected field is light-pen-detectable.
D Following protected field is light-pen-detectable.
h Following unprotected field has high intensity.
H Following protected field has high intensity.
i Unprotected nondisplay field follows.
I Protected nondisplay field follows.

4.13 Command Descriptions

To start TELNET, enter either the TELNET command or the TN3270 command at the DCL prompt.

To use TELNET commands, enter them at the TELNET> prompt.

This section provides complete descriptions of each TELNET command. The related ENABLE and DISABLE commands are presented together (see the description for ENABLE).


CONNECT

Establishes a TELNET connection between your local system and a remote host. You can run one session or 10 or more simultaneous sessions (only one session if you invoke TN3270).

DCL Format

CONNECT host [ port* [ terminal_type ] ]

* Required if you specify terminal type.


UNIX Format

open host [ port ] [ terminal_type ]


Parameters

host

Required.

Remote host to which you want to connect.

port

Optional without terminal_type.
Required with terminal_type.
Default: 23.

TELNET port on the remote host. Specify this parameter if:

terminal_type

Optional. Default: model of your physical terminal.

Terminal model that you want your physical terminal to function as. Specify one of the following:


Examples

#1

TELNET> CONNECT MYBUD 
      

Establishes a TELNET connection to remote host MYBUD.

#2

TELNET> CONNECT DEBTS 23 IBM-3278-2 
      

Establishes a TELNET connection to remote host DEBTS and runs TN3270. Your terminal functions as an IBM-3278-2 model terminal. For syntax reasons, specifying a port number is required.

#3

TELNET> CONNECT 130.180.5.5 
      

Establishes a TELNET connection to the host at IP address 130.180.5.5.

#4

TELNET> CONNECT REVIN 31 
      

Establishes a TELNET connection to remote host revin . The connection is at port 31 on revin .

#5

% [Ctrl/]]
TELNET> CONNECT QUIK
   .
   .
   .
%
      

During a TELNET session with a UNIX host, pressing Ctrl/] escapes to the TELNET prompt. Another CONNECT command establishes a second session, this one to UNIX host quik .


BIND_SESSION

Creates a TELNET terminal device (TNAx:) and connects to a network device (BGx:). If successful, returns the TNA device name (TNAx:) in the DCL symbol $TELNET_DEVICE. Network input and output operations can then be performed through the created TELNET device using terminal driver $QIO operations.

DCL Format

BIND_SESSION network_device [ /PROTOCOL=option ]


Parameters

network_device

Required.

An existing network device.


Qualifiers

/PROTOCOL=option

Optional. Default: NONE.

Options include:


Example


TELNET> BIND_SESSION BG393: /PROTOCOL=NVT 
      


CREATE_SESSION

Establishes an outbound TELNET pseudodevice (network terminal) and connects it to a remote listener (port).

DCL Format

CREATE_SESSION host port [ unit ]


[ /[ NO ]TIMEOUT=option ]
[ /PROTOCOL=option ]


Parameters

host

Required.

Remote host to which you want to connect.

port

Required.

TELNET port on the remote host.

unit

Optional. Default: 0

The decimal number specifying the unit number for the pseudodevice (TNAx). The default 0 specifies that TCP/IP Services should pick the next available unit number. If the requested unit number is already in use, the next available unit number is used. In all cases, the software notifies you of the unit number chosen.


Qualifiers

/TIMEOUT

/NOTIMEOUT

Optional. Default: /NOTIMEOUT

/PROTOCOL=options

Optional. Default: NONE. Options include:

EXAMPLES

#1

TELNET> CREATE_SESSION DEBTS 23 2 
      

Establishes a network terminal known as TNA2, and connects this device to port 23 on remote host DEBTS.

#2

TELNET> CREATE_SESSION 
/TIMEOUT=(NOIDLE, RECONNECTION=NN)
      

Creates a device that disconnects on deassignment and reconnects when data is written to it.

#3

TELNET> CREATE_SESSION /NOTIMEOUT
      

Creates a device that is not reusable; the device disconnects on deassignment and is deleted.

#4

TELNET> CREATE_SESSION /TIMEOUT=(IDLE=0:0:30, RECONNECTION=0:2:00)
 
      

Creates a device that times out after being idle for 30 seconds and that retries connection attempts at 2-minute intervals.


Previous Next Contents Index