VMS Help TCPIP Services, TELNET *Conan The Librarian (sorry for the slow response - running on an old VAX) |
With the TELNET software in DIGITAL TCP/IP Services for OpenVMS, you can log in to a remote internet system. This is called establishing a TELNET session. Your terminal appears to be attached directly to the remote system. You can establish a TELNET session with a host that uses IBM 3270 model terminals (TN3270). Note that you can also use RLOGIN to log in to remote internet hosts. However, RLOGIN does not have the ability to manage a 3270 session. To use the network terminal services, you need the following: o A user account on the remote host also running TELNET. o A user account on the OpenVMS system that runs DIGITAL TCP/IP Services for OpenVMS. For more information about specific TELNET commands, enter the following $ TELNET TELNET> HELP
1 - Command Summary |
To use TELNET, issue the commands summarized below. For complete descriptions (including UNIX equivalents) of each command, enter the following: $ TELNET TELNET> HELP Command Description Starting (at the DCL Prompt) TELNET Invokes TELNET TELNET remote_host Invokes TELNET and establishes a connection to a remote host TN3270 Invokes TELNET and TN3270 TN3270 remote_host Invokes TELNET, runs TN3270, and establishes a connection to a remote host Getting In and Out of Sessions CONNECT Establishes a connection between the local host and a remote host CREATE_SESSION Establishes a pseudodevice and connects it to a remote listener port DELETE_SESSION Deletes a pseudodevice created by the CREATE_SESSION command DISCONNECT Terminates your current session Ctrl/] Takes you from the remote host back to the TELNET prompt EXIT Closes open connections and exits from TELNET HELP Invokes online help RESUME Resumes an open connection SPAWN Suspends your TELNET session and takes you to the DCL prompt Customizing the TELNET Environment DISABLE AUTOFLUSH Disables the automatic flushing of output when interrupt characters are sent DISABLE AUTOSYNCH Disables the automatic sending of interrupt characters in urgent mode DISABLE BINARY Disables transmission in binary mode DISABLE CRLF Disables the sending of carriage returns as Return LF DISABLE CRMOD Disables the mapping of received carriage returns DISABLE DEBUG Disables the display of data flow information in hexadecimal DISABLE Disables the interpretation of certain LOCAL_CHARS control characters by your local TELNET client and passes them to the remote TELNET server DISABLE Disables the display of option negotiations OPTIONS_VIEW between the client and server ENABLE AUTOFLUSH Enables the automatic flushing of output when interrupt characters are sent ENABLE AUTOSYNCH Enables the automatic sending of interrupt characters in urgent mode ENABLE BINARY Enables transmission in binary mode ENABLE CRLF Enables the sending of carriage returns as Return LF ENABLE CRMOD Enables the mapping of received carriage returns ENABLE DEBUG Enables the display of data flow information in hexadecimal ENABLE LOCAL_CHARS Enables the interpretation of certain control characters by your local TELNET client and prohibits them from being passed to the remote TELNET server ENABLE OPTIONS_VIEW Enables the display of option negotiations between the client and server SHOW PARAMETERS Displays the current parameter settings SHOW SESSION Displays the current sessions SHOW STATUS Displays the current status SET ECHO Sets the echo character to the specified character SET ERASE Sets the erase character to the specified character SET ESCAPE Sets the escape character to the specified character SET FLUSHOUTPUT Sets the flush output character to the specified character SET INTERRUPT Sets the interrupt character to the specified character SET KILL Sets the kill character to the specified character SET MODE Sets the transmission mode to character or line SET QUIT Sets the quit character (an alternate interrupt character) to the specified character SET TERMINAL Sets the terminal type to the specified model Sending Commands to the Remote Host SEND AO Sends the Abort Output command SEND AYT Sends the Are You There command, testing the path to the remote application and eliciting connection status information from the remote host SEND BRK Sends the Break command SEND EC Sends the Erase Character command SEND EL Sends the Erase Line command SEND GA Sends the Go Ahead command SEND IP Sends the Interrupt character SEND NOP Sends the No Operation command to test whether data can be sent to the remote host, eliciting an error if the connection is not open SEND SYNCH Sends the Synchronize character
2 - Command Syntax |
Use the following rules when you enter a TELNET command line. o Command formats With the TELNET command and most of the commands at the TELNET prompt, you can use either DCL-style or UNIX style syntax. For example, the following two commands produce the same results: $ TELNET TELNET> SHOW PARAMETERS $ TELNET TELNET> DISPLAY o Quotation marks No quotation marks are required for typing: o The TELNET command line, for example: $ TELNET CENTRAL o The TN3270 command line, for example: $ TN3270 CENTRAL o Commands at the TELNET prompt, for example: TELNET> CONNECT CENTRAL
2.1 - Example
The following example connects to UNIX host migain and sets a terminal type with the /TERMINAL_TYPE qualifier. No quotation marks are needed to pass a terminal type to migain in lowercase, as demonstrated with the remote host's printenv command. $ TELNET MIGAIN /TERMINAL_TYPE=vt300 %TELNET-I-Trying, Trying ...11.90.208.56 %TELNET-I-SESSION, Session 01, host migain, port 23 -TELNET-I-Escape, Escape character is '^]' Hello from UNIX host migain login: root Password:... . . . migain# printenv TERM=vt300 HOME=/ SHELL=/bin/csh USER=root PATH=/bin:/usr/bin:/usr/ucb:/etc:/usr/etc:. LOGNAME=root PWD=/ migain#
3 - Starting |
You can start a TELNET or TN3270 session with a remote host (also called establishing a connection and opening a connection) in one of the following ways: o At the DCL prompt, issue either the TELNET or TN3270 command and specify a remote host. o At the DCL prompt, issue the TELNET or TN3270 command with no parameters. At the TELNET or TN3270 prompt that appears, issue the CONNECT or open command, specifying a remote host. o Invoke and use TELNET or TN3270 from a command procedure.
3.1 - Example
The following example shows three ways to establish a connection interactively: $ TELNET CENTRAL /TERMINAL_TYPE=IBM-3278-2 $ TELNET TELNET> CONNECT CENTRAL 23 VT200 $ TN3270 CENTRAL /TERMINAL_TYPE=IBM-3278-3 You can invoke TELNET or TN3270 and, without connecting to a remote host first, enter certain commands that customize the sessions and display parameters or status. $ TELNET TELNET> SHOW STATUS %TELNET-E-NOSESSION, No active session Escape character: '^]' TELNET>SET DEVICE TERMINAL=VT300 TELNET> OPEN GALAXY %TELNET-I-TRYING, Trying ... 1.20.208.10 %TELNET-I-SESSION, Session 01, host galaxy, port 23 -TELNET-I-ESCAPE, Escape character is ^] Digital UNIX (galaxy.udb.com) (ttyp5) login:
4 - Exiting |
You can end a TELNET or TN3270 session (close the connection) in one of the following ways: o At the remote host's system prompt, log out. o At the remote host's system prompt, return to the TELNET or TN3270 prompt and disconnect the session, as follows: 1. At the remote host's system prompt, press the TELNET/TN3270 escape character (Ctrl/] is the default). 2. At the TELNET or TN3270 prompt, issue either DISCONNECT or close.
4.1 - Example
The following example shows two ways to close connections: % logout %TELNET-S-REMCLOSED, Remote connection closed -TELNET-I-SESSION, Session 01, host galaxy, port 23 TELNET> TELNET> EXIT $ % <Ctrl/]> (characters not echoed) TELNET> DISCONNECT galaxy.udp.com> TELNET> DISCONNECT %TELNET-S-LCLCLOSED, Local connection closed -TELNET-I-SESSION, Session 01, host galaxy, port 23 TELNET>
5 - Logging Sessions |
To keep a log of your TELNET session, use the /LOG_FILE qualifier. (You cannot use this qualifier with a TN3270 session.) The following example establishes a TELNET connection to node central, sets the terminal type to VT200, and logs all session output to the file CENT.LOG in your current directory. $ TELNET/LOG_FILE=CENT.LOG/TERMINAL_TYPE=VT200 CENTRAL
6 - Command Procedures |
You can create a command procedure containing the DCL DEFINE and TELNET (or TN3270) commands. You can create initialization command files to customize your TELNET/TN3270 sessions with SET, ENABLE, and DISABLE commands. These command files: o Are optional. They eliminate the need to issue individual TELNET commands. o Have the following requirements: - Location: Your login directory - Name: TELNETINIT.INI - Format: one command per line o Run automatically when you invoke TELNET or TN3270. o You can specify the logical name, TELNETINIT, to point to an initialization file.
6.1 - Example
The following example shows a TELNET initialization command procedure. ! This file, TELNETINIT.INI, sets my TELNET parameters ! the way I like them. ! DISABLE AUTOFLUSH ENABLE BINARY ENABLE DEBUG SET DEVICE /TERMINAL=VT300 SET ESCAPE "^p"
7 - Toggling |
During a session with a remote host, you can toggle back and forth between the local TELNET or TN3270 process and the connected host. For example, at the TELNET prompt, you might want to display status, modify a TELNET parameter, or spawn a DCL subprocess. o To return to the local TELNET or TN3270 prompt (TELNET command mode), enter the TELNET escape sequence (the default is Ctrl/]) at the remote host's prompt (TELNET input mode). o To resume your session with the remote host, enter one of the following at the TELNET (or TN3270) prompt. TELNET> <Return> or TELNET> RESUME or TELNET> RESUME n where n is the number of the session to which you want to return. o To change the default escape sequence, enter the following at the TELNET (or TN3270) prompt: TELNET> SET ESCAPE "^escape_character"
7.1 - Examples
1. The following example toggles between remote UNIX host biway and the local OpenVMS system. biway> <Ctrl/]> (characters not echoed) TELNET> SHOW STATUS Session 1 Active Host biway Port 23 Operating Mode: Character-at-a-time Escape character: '^]' Options: Echo - Remote Terminal Type - Local Terminal Type - VT300 Suppress Go Ahead - Local Suppress Go Ahead - Remote Terminal Dataoveruns: 0 Suspended Network I/Os: 0 . . . ) TELNET> <Return> biway> 2. In the next example, user BENTLEY, working at OpenVMS node EAGLE, uses TELNET to do the following: 1. Establish a connection to UNIX host fern. 2. Return to the local TELNET prompt. 3. Display status. 4. Establish a connection to host gannet. 5. Return to the TELNET prompt. 6. Display status. 7. Connect to sands. But, sands closes the connection because BENTLEY incorrectly enters the password three times. 8. Try to resume the session with gannet. However, RESUME without specifying a session number fails: - With multiple sessions, RESUME's default is the "active" session, the one with the most recently opened connection. - The most recent host to which BENTLEY connected is sands. However, due to BENTLEY's incorrectly typing of the password during login, sands closed the TELNET connection. Thus, TELNET displays "No current session." - Because no connection is "active" (or "current"), BENTLEY must specify a session number on the RESUME command line. $ TELNET FERN . . . fern> <Ctrl/]> (characters not echoed) TELNET> SHOW STATUS Session 1 Active Host FERN . . . TELNET> CONNECT GANNET . . . gannet> <Ctrl/]> (characters not echoed) TELNET> SHOW STATUS Session 2 Active Host GANNET Operating Mode: Character-at-a-time Escape character: '^]' . . . Session 1 Waiting Host FERN TELNET> CONNECT SANDS %TELNET-I-Trying, Trying...11.18.222.95 %TELNET-I-SESSION, Session 03, host sands, port 23 -TELNET-I-Escape, Escape character is '^]'. . . . Sun Microsystems, Inc. UNIX System sands - Authorized Access Only Username: BENTLEY Password: User authorization failure Username: BENTLEY Password: User authorization failure Username: BENTLEY Password: User authorization failure Remote connection closed TELNET> RESUME No current session TELNET> SHOW STATUS Session 1 Waiting Host FERN Session 2 Waiting Host GANNET . . . TELNET> RESUME 2 gannet> <Ctrl/]> (characters not echoed) TELNET> SHOW STATUS Session 2 Active Host GANNET Operating Mode: Character-at-a-time Escape character: '^]' . . . Session 1 Waiting Host FERN TELNET>
8 - Suspending |
While using TELNET, you can use the SPAWN command to suspend your current session and create a subprocess at the local DCL prompt. At the DCL prompt, you can then enter any number of DCL commands. To return to your suspended TELNET session (exiting the DCL subprocess), enter the LOGOUT command.
8.1 - Example
In the following example, the user suspends the TELNET session to list the files in the working directory on the local host and deletes one of the files in that directory. TELNET> SPAWN $ DIR . . . $ DEL TR3.TXT:*
9 - Multiple Sessions |
TELNET supports: o Multiple simultaneous connections o Up to 10 simultaneous sessions o Only one session at a time if it uses TN3270 The TELNET SHOW STATUS command helps you keep track of multiple sessions. o Toggling Sessions To toggle from one open TELNET connection to another: 1. Enter the TELNET escape sequence. 2. If necessary, issue SHOW STATUS to check the number of your session with the other host. 3. Issue the TELNET RESUME n command, where n is the number of the session to which you want to return. o Session Information To display a list of your active sessions, use the SHOW SESSION command: TELNET> SHOW SESSION <Return> Session 01, host finder, port 23 Session 02, host keeper, port 23 (default active session) If there are no active connections, the SHOW SESSION command displays the following message: %TELNET-E-NOSESSION, No active session
10 - Customizing |
To customize the TELNET/TN3270 processing environment, issue ENABLE, DISABLE, and SET commands. You can modify how TELNET and TN3270: o Send and receive transmissions o Display processing on your terminal o Interpret certain control characters You can redefine the following control characters, such as when your terminal or the remote host does not recognize the corresponding default control character. o Echo o Erase o Escape o Flush output o Interrupt o Kill o Quit Use the SET command to redefine these characters. For example, the following command defines the interrupt character to be the letter a or A. TELNET> SET INTERRUPT "^a" TN3270 allows you to redefine your keyboard. You can redefine most IBM 3270 model functions and all emulated functions and characters. You can create a key definition file with DEFINE/KEY statements to redefine the keyboard. Or, you can redefine a key interactively, using the DEF KEY function (Ctrl/K on VT100- and VT200-series terminals). You can determine the mode TELNET uses to transmit data. The appropriate TELNET mode for a session depends on: o The remote host to which you are connecting o The applications you use The following table shows the modes that control TELNET communications. Mode Function Local Characters The local host interprets control characters, Mode translating them in to TELNET protocol sequences (ENABLE LOCAL_CHARS). Use this mode when the local and remote hosts implement different control characters. By default, characters are interpreted by the remote host (DISABLE LOCAL_CHARS). Binary Mode The local host sends transmissions in binary mode (ENABLE BINARY). Use this mode when the remote host expects each line of data to end with a carriage return/line feed combination. By default, the local host sends transmissions with the end-of-line character (EOL) mapped to the carriage return/line feed combination (DISABLE BINARY). Debug Mode TELNET displays data flow in both hexadecimal and readable text (ENABLE DEBUG). By default, TELNET displays data in readable text only (DISABLE DEBUG). Character TELNET transmits data one character at a time Transmission (SET MODE CHAR) rather than line-by-line. Use Mode this mode when you run a text editor (on the remote host) that does character processing. Character transmission mode is the default. Line TELNET transmits data one line at a time (SET Transmission MODE LINE). Most clients send a character at a Mode time. The remote host server must support line transmission mode. This allows you to do signal trapping as well as local character editing and tab expansion.
11 - TN3270 |
You can run a TELNET session with a host that uses IBM 3270 model terminals by using the TN3270 command. The TN3270 command: o Provides IBM 3270 Information Display System (IDS) terminal emulation. o Assigns IBM 3270 functions to your DIGITAL keyboard. o Assigns IDS functions to specific keys. During a TN3270 session, you can: - Redefine keys interactively (DEF KEY Function). - Redefine keys permanently (Key Definition File). - Record your sessions (Recording Sessions). - Troubleshoot problems (TN3270 Troubleshooting). NOTE When you run TN3270, you can only have one session. You cannot have other sessions running simultaneously, as you can when running normal TELNET sessions. TELNET can emulate the following IBM 3270 model terminals: Model Screen Size (Rows x Columns) IBM 3278 Model 2 24 x 80 IBM 3278 Model 3 32 x 80 IBM 3278 Model 4 43 x 80 IBM 3278 Model 5 27 x 132
11.1 - Terminal Setup
When you use TELNET and specify IBM 3270 model terminal emulation (TN3270), the image displayed on your screen depends on the type of DIGITAL terminal you use (or that your PC is emulating) and the features you set on it. o VT200 Series Terminals Follow these steps: 1. At the Set-up Directory menu, select the keyboard type that corresponds to the keyboard layout you are using (for example, North American). 2. At the Display Set-up menu, select the following: o Interpret controls o Light text, dark screen o Cursor (visible) 3. At the General Set-up menu, select the following: o VT200 or VT100 mode (if VT100 mode, set VT100 ID) o 7-bit or 8-bit controls o Multinational/national o Normal cursor keys o No new line 4. At the Communications Set-up menu, select the following: o XOFF at 64 or XOFF at 128 o 8-bit communication line o 8-bit (any) parity o No local echo 5. At the Keyboard Set-up menu, select warning bell ON. At the DCL prompt, issue: $ SET TERMINAL /INQUIRE The software determines the terminal's characteristics and sets the appropriate parameters. If you select National Character mode, issue: $ SET TERMINAL /NOEIGHTBIT o VT100 Series Follow these steps: 1. Set your terminal to ANSI mode (see the user's guide for your terminal). 2. Enter the following command at the DCL prompt: $ SET TERMINAL/INQUIRE This command causes the terminal to be questioned about its characteristics. The appropriate parameters for the terminal are set up according to its response. TN3270 requires DIGITAL terminals or DECterm windows that support at least 24 lines and 80 columns.
11.2 - Starting and Exiting
Start a TN3270 session by using the TN3270 command. You can also use the TELNET/TERMINAL_TYPE=IBM-3278-n command. The default terminal type is IBM-3278-2. You can invoke TN3270 and, without connecting to a remote host first, enter certain commands that customize the sessions and display parameters or status. You can also use a command file to invoke TN3270 and the customization. The TN3270 command includes several qualifiers that allow you to specify customized or special files for the following: o Character set translation tables file (/CHARACTER_SET=file) that translates between EBCDIC and the DIGITAL Multinational Character Set. The default file, if set up by your system manager, is SYS$LIBRARY:TN3270DEF.TBL. If this file does not exist, and you do not specify a file, TN3270 uses its own translation table. o Keyboard definition file (/KEY_DEFINITIONS=file) that you create as an alternative to the default keyboard layout. o National Replacement Character Set (NRCS) file (/NATIONAL_ CHARACTERS=n) for which your DIGITAL terminal is configured. The default for 8-bit terminals is MULTINATIONAL. The default for 7-bit terminals is US_ASCII. You can end a TN3270 session (close the connection) in one of the following ways: o At the remote host's system prompt, log out. o At the remote host's system prompt, return to the TN3270 prompt and disconnect the session, as follows: 1. At the remote host's system prompt, press the TN3270 escape character (Ctrl/] is the default). 2. At the TN3270 prompt, issue either DISCONNECT or close. Clearing Error Messages TN3270 displays error messages in a bordered display at the bottom of your screen. This display overwrites the status display and remains visible until you clear it. To clear, invoke one of the following functions: o REFR o HELP o SET FIL o DEF KEY Recording Sessions During a TN3270 session, you can record your screen's contents. The PRINT function directs your screen's contents to either a file or a spooled printer. To record your screen's contents, follow these steps: 1. Invoke the PRINT keyboard function, as explained in the topic Keyboard_Functions. The screen display is recorded in a file in a compressed state. Null lines (lines with only nulls and attribute characters) do not appear. 2. Invoke the ENTER function or any function that transmits the screen contents to the remote host's application, as explained in the topic Keyboard_Functions. This creates the default output file, TN3270PRINT.LIS. TELNET does the following: o Each time you start a TELNET session that runs TN3270, TELNET opens a new TN3270PRINT.LIS file. o Each time you use PRINT during a session, TELNET appends new output from the screen to the end of TN3270PRINT.LIS. o Each time you use PRINT, if you direct the output to a printer, TELNET creates a separate entry in the print queue. o If the printer is spooled, TELNET immediately prints the output. You can specify a different file name. To change the name, use one of the following two methods: o When you start a TN3270 session, use the /PRINTER qualifier. Issue: $ TN3270 [ host ] /PRINTER=file o During a TN3270 session, follow these steps: 1. Use the SET FIL keyboard function, as explained in the topic Keyboard_Functions. 2. At the prompt for a new file name, enter a name. If you specify the same name that is already in use, subsequent PRINT operations direct output to a new version of the same file. 3. Use the NEW LINE keyboard function, as explained in the topic Keyboard_Functions. Locked Keyboards If your keyboard locks, the terminal bell rings, and the status line displays: Inhib To unlock the keyboard, press the following key to invoke the RESET function (KP0 refers to the 0 key in the application keypad on the right hand side of the keyboard): <KP0> Do not use the following functions when the cursor is in a protected field (a field that does not accept user input): o DELETE o DUP o ER EOF o FM o Any graphic character
12 - TN3270 Keyboard Functions |
The options listed below under "Additional Information Available" describe the keyboard functions. Preceding each function description are the key sequences for VT100 and VT200 terminals and the function name to use in a DEFINE/KEY command. In many of the key sequences, TN3270 allows use of the extended function (EXT) feature. Used in conjunction with another key, EXT allows access to an extended function for that key. The extended function feature is described below in more detail.
12.1 - ATTACH
VT100: EXT + E VT200: EXT + Find DEFINE_KEY Function: ATTACH Changes control from one subprocess to another subprocess or to the parent process. When you invoke the ATTACH function, TN3270 uses the name of the last process to which you attached as the default process name. If you want to attach to a different process, press Ctrl/U to erase the default process name. You can then enter the process name of your choice at the prompt. The process name can be a quoted string. Use the quotation marks to preserve spaces, tabs, or lowercase letters in strings.
12.2 - ATTN
VT100: EXT + A VT200: F19 DEFINE_KEY Function: ATTENTION Provides a way to "get the attention of" the remote application program that you are running by sending a SIGNAL RU command to the remote host. See the user's guide of the particular application program to learn what response the program gives when you use this key.
12.3 - Back Tab
VT100: BACKSPACE VT200: F12 DEFINE_KEY Function: BACK_TAB Moves the cursor, depending on the type of screen. On a formatted screen, the cursor moves one of these ways, depending on the location when you press this key: o If the cursor is in a field, but not at the first position of the field, it moves to the beginning of the unprotected field that it is in. o If the cursor is in the first position of a field, it moves to the beginning of the preceding unprotected field. If the cursor is in the first position of the first unprotected field, the cursor moves to the first position of the last unprotected field on the screen. On an unformatted screen, the cursor returns to the first position on the screen.
12.4 - Cent Sign
VT100: EXT + C VT200: EXT + C DEFINE_KEY Function: (None) Enters a cent sign. If your terminal does not have this character, your screen displays a hyphen ( - ).
12.5 - CLEAR
VT100: EXT + Enter VT200: EXT + F20 DEFINE_KEY Function: CLEAR Clears the screen and moves the cursor to the first position on the screen. When you invoke the CLEAR function, the software notifies the application program that this function has been used.
12.6 - DEF_KEY
VT100: Ctrl/K VT200: Ctrl/K DEFINE_KEY Function: DEFINE_KEY Lets you interactively define or redefine a key. You get a prompt for the name of the key to define and for a function you want to assign to that key.
12.7 - DELETE
VT100: Delete VT200: <X] DEFINE_KEY Function: DELETE Deletes the character at the cursor. The cursor remains where it is, and the other characters to the right of the cursor in the same field move one position to the left. The end of the field fills with blanks. Note that this is not the action normally associated with the Delete key on DIGITAL terminals.
12.8 - DSP_ATT
VT100: Ctrl/V VT200: EXT + F17 DEFINE_KEY Function: DISPLAY_ATTRIBUTES Enables and disables the visible attribute mode. This mode of operation forces display of the attribute characters (that is, the characters at the start of a field that indicate the display and data type of that field). In IBM 3270 model terminal emulation (TN3270), you can use the DSP ATT function to debug application programs.
12.9 - DUP
VT100: EXT + * VT200: EXT + F12 DEFINE_KEY Function: DUP Lets you enter a value in the same field in several forms without needing to repeat the entry for each form. After entering the data in the field on the first form, use the DUP function when at the same field on succeeding forms. The application program makes the necessary translation, filling in these fields with the same value. For details about the use of this key, refer to the user's guide of the particular application program. Displays an asterisk (*).
12.10 - DV_CNCL
VT100: EXT + U VT200: EXT + Remove DEFINE_KEY Function: DVCNCL Cancels the RECORD function. Use the DV CNCL function if you begin using the RECORD function and then decide you want to stop. If you want to delete a sequence that has already been recorded on a PF key, use the RECORD function, press the PF key, and then use the DV CNCL function.
12.11 - ENTER
VT100: Line Feed + Enter VT200: Do + Enter DEFINE_KEY Function: ENTER Sends your input to the remote application program. While this communication is active, the keyboard locks and Inhib appears on the status line. Usually the application program releases the keyboard when it has finished processing your input.
12.12 - ER_EOF
VT100: EXT + KP, VT200: F18 DEFINE_KEY Function: ERASE_EOF Erases the contents of the current field, from the location of the cursor to the end of the field. The cursor remains in the same location.
12.13 - ER_INP
VT100: EXT + KP- VT200: EXT + F18 DEFINE_KEY Function: ERASE_INPUT On a formatted screen, clears all the data in the unprotected fields on your screen and moves the cursor to the first position in the first unprotected field on the screen. On an unformatted screen, clears all the data and moves the cursor to the first position on the screen. You can also use the ER INP function to remove all previously recorded key sequences by using the RECORD function and then the ER INP function.
12.14 - EXIT
VT100: Ctrl/Z or F10 VT200: Ctrl/Z or F10 DEFINE_KEY Function: EXIT Terminates the remote TELNET/TN3270 session. Aborts any exchange of data in progress between the local and remote hosts. Note that terminating a session with the IBM host in this way may result in improper termination of the session. For the appropriate logoff command string, see the user's guide for the IBM application with which you are communicating.
12.15 - EXT
VT100: KP. VT200: KP. DEFINE_KEY Function: EXTEND Used in conjunction with another key, allows access to an extended function for that key. First invoke the EXT function and then press the second key. If you invoke EXT accidentally, invoking the RESET function cancels the EXT function. If the status display is enabled when you invoke the EXT function, the word Extend appears on the status line.
12.16 - FM
VT100: EXT + ; VT200: EXT + F13 DEFINE_KEY Function: FM Specifies the end of a field on an unformatted screen or the end of part of an unprotected field on a formatted screen. Refer to the user's guide of the remote application program for specific use of this key. Displays a semicolon ( ; ).
12.17 - HELP
VT100: EXT + H VT200: Help DEFINE_KEY Function: HELP Displays online help and an illustration of the TN3270 keyboard.
12.18 - HOME
VT100: EXT + B VT200: F13 DEFINE_KEY Function: HOME Repositions the cursor to the first position in the first unprotected field on the screen (that is, to the beginning of the input area on the screen).
12.19 - Left/Right Arrows
VT100: Right arrow or VT200: Right arrow or Left arrow Left arrow DEFINE_KEY Function: RIGHT, RIGHT_NOWRAP, LEFT, or LEFT_NOWRAP Moves the cursor horizontally across your screen without changing data you have already entered. If the cursor is at the: o End of a line when you use the Right arrow function, the cursor moves to the start of the next line. o Beginning of a line when you use the Left arrow function, the cursor moves to the end of the previous line. If the screen display you receive is wider than 80 columns, you can use the Right arrow and Left arrow functions to move through the display. If you want the cursor to wrap to the opposite edge of the display, use one of the following function sequences: EXT + Right arrow EXT + Left arrow
12.20 - INSERT
VT100: EXT + PF4 VT200: F14 DEFINE_KEY Function: INSERT_MODE Enables insert mode. Use insert mode to edit what you entered. If the status display is enabled, Insert appears. In insert mode, when you enter a character in to an unprotected field, it is displayed to the left of the cursor, moving the following one position to the right: o The cursor o The character at the cursor location o All the characters to the right of the cursor in the field You can insert characters in to an: o Unformatted screen o Unprotected field on a formatted screen until it is full If you attempt to insert characters after the field is full, the keyboard locks, the terminal bell rings, and the word Inhib appears on the status line. If the keyboard locks when you try to insert characters in to a field that looks empty, the field might have trailing spaces. To erase these spaces, use the ER EOF function. To return your screen to the normal mode of entry, use one of the following keyboard functions: o RESET o CLEAR o ENTER o Any PA key o Any PF key
12.21 - Logical Not
VT100: EXT + N VT200: EXT + N DEFINE_KEY Function: (None) Represents the remote host's symbol for a logical NOT; displayed as a circumflex ( ^ ) on DIGITAL terminals.
12.22 - Logical Or
VT100: EXT + O VT200: EXT + O DEFINE_KEY Function: (None) Represents the remote host's symbol for a logical OR; displayed as a solid vertical line from the terminal's graphics set. Press Ext + O if the vertical bar is not available on your keyboard.
12.23 - New Line
VT100: Return VT200: Return DEFINE_KEY Function: NEWLINE Moves the cursor to the first unprotected position on the next line of your screen. If no unprotected fields are on the screen when you invoke the new line function, the cursor moves to the first location on the screen. If the screen has no fields, this key has the same function as the Return key on DIGITAL terminals.
12.24 - NUM_OVR
VT100: EXT + J VT200: Remove DEFINE_KEY Function: NUMOVR Lets you enter nonnumeric characters in to numeric fields. Once you enable this function, use NUM OVR again to disable it. If you do not disable the numeric lock override, it remains enabled even after you exit from TN3270. The letter O appears on the status line to indicate that the numeric lock override is in effect.
12.25 - PA Keys
VT100: PF4 , KP- , KP, VT200: PF4 , KP- , KP, DEFINE_KEY Function: PA1-PA3 These program access keys are defined by the program you are using. These keys request attention from the remote application program without sending any data. You should refer to the user's guide of your application program to learn how the PA keys are defined.
12.26 - PF Keys
VT100: see below VT200: see below DEFINE_KEY Function: PF1-PF24 These program function keys are defined by the remote application program you are using. They request attention from the application program and send the data entered to the host. The PF keys are coded by the application program to perform functions relating to the application. A particular PF key may be coded differently from one application to another. The user's guide of the remote application program usually defines the specific PF key assignments for that application program. To Implement This Press This Key or Function Key Combination PF1 PF1 PF2 PF2 PF3 PF3 PF4 KP7 PF5 KP8 PF6 KP9 PF7 KP4 PF8 KP5 PF9 KP6 PF10 KP1 PF11 KP2 PF12 KP3 PF13 EXT + PF1 PF14 EXT + PF2 PF15 EXT + PF3 PF16 EXT + KP7 PF17 EXT + KP8 PF18 EXT + KP9 PF19 EXT + KP4 PF20 EXT + KP5 PF21 EXT + KP6 PF22 EXT + KP1 PF23 EXT + KP2 PF24 EXT + KP3
12.27 - PLAY
VT100: EXT + M VT200: Insert Here DEFINE_KEY Function: PLAY Recalls keystroke sequences stored on PF keys using the RECORD function. Invoke the PLAY function and then press the PF key on which the desired key sequence is stored. The PLAY function executes all commands included in the keystroke sequence. If the HELP utility is invoked in your key sequence, the PLAY function continues until you exit from the HELP utility. Also, if you use functions that require you to respond to prompts (such as ATTACH, DEF KEY, SET FIL, or SPAWN), the information you enter at the prompt is not recorded. When you recall the sequence, the system prompts you for this information again. P appears on the status line if the status display is enabled.
12.28 - PRINT
VT100: EXT + P VT200: F11 DEFINE_KEY Function: PRINT Records the contents of your screen in a file or at a printer. (This is a local print feature.) If the status display is enabled when you use the PRINT function, the word Print appears on the status line. Your screen refreshes when the printing process completes. The first use of PRINT in a given run of TN3270 creates a new version of the output file. Successive uses of PRINT in the same program cause the screen contents to append to the existing file. If the output is directed to a printer, each use of PRINT creates a separate entry in the printer queue. If the printer is a spooled printer, the output is released for printing immediately. Use the command qualifier /PRINTER=file to specify where to direct the output file. The SET FIL function allows you to change the name of the output file each time you invoke the PRINT function.
12.29 - RECORD
VT100: EXT + L VT200: EXT + Insert Here DEFINE_KEY Function: RECORD Saves a keystroke sequence on a specific PF key. Invoke the RECORD function with the appropriate key sequence (as described above), press the PF key as prompted, enter the keystroke sequence, and then invoke the RECORD function again. You can save a maximum number of 127 keystrokes on each PF key. If the status display is enabled when you use the RECORD function, the letter R appears on the status line. To recall the keystroke sequence, use the PLAY function. Use the DV CNCL function to cancel the RECORD function. To erase all previously recorded key sequences, use the ER INP function.
12.30 - REFR
VT100: Ctrl/W VT200: Ctrl/W or F20 DEFINE_KEY Function: REFRESH Removes TN3270 error messages, operating system messages, or other messages that appear on your screen. This key function deletes extraneous characters from your screen and redisplays the fields and data that were on the screen before the interruption. This function does not transmit or receive data from the remote host. It is a local OpenVMS function.
12.31 - RESET
VT100: KP0 VT200: KP0 DEFINE_KEY Function: RESET Returns the keyboard to normal input mode from insert mode. Also, the RESET function returns the keyboard to your control after it locks when you try to enter data in to a protected or a full field, or when you try to enter the wrong type of data in to a field. Invoking RESET turns off the Inhib indicator. The cursor remains where it is and the screen remains unchanged.
12.32 - SELECT
VT100: EXT + K VT200: Select DEFINE_KEY Function: SELECT Lets you choose items from a menu, table, or list and then notify the program of your selection. Use the arrow keys to position the cursor on the field designator character, then use the SELECT function. For more information on using SELECT, refer to the user's guide of the remote application.
12.33 - SET_FIL
VT100: EXT + F or Ctrl/F VT200: EXT + F11 DEFINE_KEY Function: SET_PRINTFILE Lets you change the name of the file or device that receives output each time you invoke the PRINT function. After you invoke SET FIL, you are prompted for the name of a new output device, emulating the remote host's IDENT function. Note that if you specify the same name that is already in use, subsequent PRINT operations direct output to a new version of the same file.
12.34 - SHO_MSG
VT100: EXT + G VT200: EXT + F14 DEFINE_KEY Function: SHOW_MESSAGE Displays the broadcast messages that have been posted on a separate screen. If the status line is enabled, Msg appears on the status line. If you do not read the messages before they fill up the screen, the messages begin to scroll up out of view and you will no longer be able to read them. These broadcast messages are not saved after you read them or exit TN3270.
12.35 - SPAWN
VT100: EXT + D VT200: Find DEFINE_KEY Function: SPAWN Creates a subprocess under the current process. Use the LOGOUT command to terminate the subprocess. Because a tree of subprocesses can be established using the SPAWN function, you must be careful when terminating any process in the tree. When a process is terminated, all subprocesses below that point in the tree are terminated automatically. When you create a subprocess, you can specify an optional command string. The command string is executed within the created subprocess and the subprocess terminates upon completion of the command.
12.36 - STATUS
VT100: EXT + S VT200: F17 DEFINE_KEY Function: STATUS Lets you enable and disable the display of status information. When you enable STATUS, the last line on your screen is painted over with a reverse video strip. This line may conceal remote host system or application information. If this occurs, Hidden appears in the status line. Disable the status display by using the STATUS function again.
12.37 - SYS_REQ
VT100: EXT + R VT200: EXT + F19 DEFINE_KEY Function: SYS_REQUEST Lets you shift between the application program (the LU-LU session) and the control program (the SSCP-LU session). If the status display is enabled, Appl or SSCP appears on the status line to indicate the type of session. Appl appears when you are in an LU-LU session and SSCP appears when you are in the SSCP-LU session. The screen is refreshed when you use the SYS REQ function.
12.38 - Tab
VT100: Tab VT200: Tab DEFINE_KEY Function: TAB Moves the cursor to the first character location of the next unprotected field on your screen. If the screen has no fields, the Right arrow | function moves the cursor to the first location on the screen. If the cursor is within the last unprotected field on the screen, the cursor moves to the first position of the first unprotected field on the screen.
12.39 - Up/Down Arrows
VT100: Up arrow or Down VT200: Up arrow or Down arrow arrow DEFINE_KEY Function: UP, UP_NOWRAP, DOWN, or DOWN_NOWRAP Moves the cursor vertically on your screen without altering the data you have already entered. If the cursor is at the: o Top of the screen when you press the up arrow, the cursor appears in the same column at the bottom of the screen o Bottom of the screen when you press the down arrow, the cursor appears in the same column at the top of the screen If the screen display you receive is larger than 24 rows deep, you can use the Up arrow and the Down arrow keys to move through the display. These keys scroll the screen display up or down. If you want the cursor to wrap to the opposite edge of the display, use the key sequence EXT + Up arrow or EXT + Down arrow.
13 - Redefining TN3270 Keyboard |
You can reassign functions and keys. To redefine a keyboard key, use either of the following methods: o Create a key definition file, a text file with individual key definitions in the form of DEFINE/KEY statements and DELETE/KEY statements. o Use the DEF KEY function (see DEF KEY Function). 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 You can also reassign the following functions: o All emulated functions o Most IBM 3270 model functions o All emulated alphanumeric and graphic characters
13.1 - Definable Keys
The keys you can define are: Location Key Name Function keys PF1-PF4 (VT100 and VT200) Application keypad KP0-KP9 (VT100 and VT200) ENTER MINUS COMMA PERIOD Top-row function keys F6-F20 (VT200) HELP (F15) DO (F16) Editing keypad (E1-E6) FIND (E1) (VT200) INSERT_HERE (E2) REMOVE (E3) SELECT (E4) PREV_SCREEN (E5) NEXT_SCREEN (E6) Cursor keys UP (VT100 and VT200) DOWN LEFT RIGHT Control keys Ctrl/A-Ctrl/Z, including: (VT100 and VT200) 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
13.2 - Nondefinable Keys
You cannot redefine the following DIGITAL-reserved keys: o Ctrl/Y - Interrupt o Ctrl/C - Cancel/interrupt o Ctrl/O - Output off/on o Ctrl/S - Suspend output o Ctrl/Q - Resume output o F1-F5
13.3 - Key Definition File
Use the DEFINE/KEY and DELETE/KEY statements to create your own key definition file as described in the following sections. The DEFINE/KEY statement assigns a new function to a particular key. Its format is: DEFINE/KEY [/STATE=EXTEND] key_name function /STATE Optional. Default: non-extend mode. Redefines the key in extend mode. key_name Standard key name on the DIGITAL terminal. function TN3270 function you want mapped to this key. You can define most of the named keys both in normal (non-extend) mode and in extend mode. You can define the control keys (and the synonyms for them) only in normal mode. 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 The DELETE/KEY statement removes the function assigned to a particular key. Its format is: DELETE/KEY [/STATE=EXTEND] key_name /STATE Optional. Default: nonextend mode. Deletes the key in extend mode. key_name Standard key name on the DIGITAL terminal.
13.4 - 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. What you enter during the DEF KEY dialog is subject to translation from the National Character Set to the DIGITAL Multinational Character Set. You cannot redefine a key that exists on your National Character Set terminal if it lacks a DIGITAL Multinational Character Set equivalent.
14 - TN3270 Troubleshooting |
During a TELNET session in which you have invoked TN3270, you might experience the following problems: Problem o The keyboard keys do not work properly. o Messages, such as the status line messages, do not appear in reverse video. o You receive a message indicating that your terminal is an unsupported model. You cannot use TN3270 on a VT131 model terminal that is running in block mode. Solution for a VT100-Series Terminal Use Set-Up mode to verify that your terminal is in ANSI mode. Issue the following command: $ SET TERMINAL /INQUIRE Solution for a VT200-Series Terminal or a Terminal Connected to Either a DIGITAL Personal Computer or a Workstation 1. Use Set-Up mode to verify that your terminal is: o In ANSI mode o Set to VT100 or VT200 emulation mode 2. Check the Communications Menu: The terminal communications line must be set for 8-bit characters. To check, issue 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. 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: o Correct TCPIP$RECSEQ.DAT in your SYS$LOGIN directory. o Delete TCPIP$RECSEQ.DAT. If the system manager must delete this file, rerecord all the key sequences you had stored on the PF keys.
15 - Debugging with TN3270 |
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: o How the field appears on the screen: - At normal intensity - At high intensity - Invisibly o What type of data the application expects in the field: - Numeric - Alphabetic - Alphanumeric
|