DIGITAL TCP/IP Services for OpenVMS
User's Guide


Previous | Contents

A user sends the man cp command to UNIX host hence for execution. #2

$ RSH /USER_NAME=ROGERS DELPHI LS 

OpenVMS user PHILIPS issues the ls command for execution at remote UNIX host delphi. PHILIPS is accessing an account called rogers.

#3
$ RSH /PASSWORD=BLOOMER AVOC8N DIRECTORY 

OpenVMS user PANTO sends the DIRECTORY command to remote OpenVMS host AVOC8N. The remote directory listing is of PANTO's home directory.

RSH /PASSWORD invokes REXEC, which authenticates PANTO's remote password.

#4
$ RSH /PASSWORD MAGIC CAT BUZZ.TXT 
REXEC password:        (not echoed)[Return] 
 

A user sends the cat command to host magic. /PASSWORD invokes REXEC, which requires a password. Because the password was omitted from the command line, REXEC prompts the user for it.


Chapter 5
Establishing Network Terminal Sessions Using TELNET/TN3270

With the TELNET software in DIGITAL TCP/IP Services for OpenVMS (UCX), you can log into a remote internet system. This is called establishing a TELNET session. Your terminal appears to be attached directly to the remote system. Using the TN3270 command, you can run a TELNET session with a host that uses IBM 3270 model terminals.

Note that you can also use RLOGIN to log into remote internet hosts. To determine the best remote login service to use for your needs, see Section 1.1.2. For more information about RLOGIN, see Chapter 4.

What You Can Do

The following table lists the TELNET/TN3270 network terminal services and the sections that explain how to use them.
Capability Section
Use either DCL-style or UNIX-style command syntax 5.1
Establish a network terminal session with a UNIX host or another OpenVMS host 5.3
Log all terminal output to a file 5.5
Toggle between the remote host and the local TELNET prompt 5.7
Suspend TELNET/TN3270 to spawn a subprocess at the DCL prompt 5.8
Establish multiple sessions 5.9
Toggle between open sessions 5.9.1
Customize the way TELNET interprets control characters, sends and receives transmissions, and displays processing on your terminal 5.6.2
5.10
Send commands to the remote host that affect processing of commands you have entered 5.11
Run IBM 3270 model terminal emulation (TN3270) 5.12
Record a TN3270 screen's contents 5.12.6

What You Need

To use the network terminal services, you need the following:

Command Summary

To use TELNET, issue the commands summarized in Table 5-1 (for complete command descriptions, see Section 5.13).

Table 5-1 TELNET/TN3270 Commands: Summary
DCL-Style UNIX-Style Description
Starting (at the DCL Prompt)
TELNET telnet Invokes TELNET
TELNET remote_host telnet remote_host Invokes TELNET and establishes a connection to a remote host
TN3270 N/A Invokes TELNET and TN3270
TN3270 remote_host N/A Invokes TELNET, runs TN3270, and establishes a connection to a remote host
Getting In and Out of Sessions
CONNECT open Establishes a connection between the local host and a remote host
CREATE_SESSION N/A Establishes a pseudodevice and connects it to a remote listener port
DELETE_SESSION N/A Deletes a pseudodevice created by the CREATE_SESSION command
DISCONNECT close Terminates your current session
Ctrl/] Ctrl/] Takes you from the remote host back to the TELNET prompt
EXIT quit Closes open connections and exits from TELNET
HELP help
?
Invokes online help
RESUME [Return] Resumes an open connection
SPAWN z Suspends your TELNET session and takes you to the DCL prompt
Customizing the TELNET Environment
DISABLE AUTOFLUSH toggle autoflush Disables the automatic flushing of output when interrupt characters are sent
DISABLE AUTOSYNCH toggle autosynch Disables the automatic sending of interrupt characters in urgent mode
DISABLE BINARY toggle binary Disables transmission in binary mode
DISABLE CRLF toggle crlf Disables the sending of carriage returns as Return LF
DISABLE CRMOD toggle crmod Disables the mapping of received carriage returns
DISABLE DEBUG toggle netdata Disables the display of data flow information in hexadecimal
DISABLE
LOCAL_CHARS
toggle localchars Disables the interpretation of certain control characters by your local TELNET client and passes them to the remote TELNET server
DISABLE
OPTIONS_VIEW
toggle options Disables the display of option negotiations between the client and server
ENABLE AUTOFLUSH toggle autoflush Enables the automatic flushing of output when interrupt characters are sent
ENABLE AUTOSYNCH toggle autosynch Enables the automatic sending of interrupt characters in urgent mode
ENABLE BINARY toggle binary Enables transmission in binary mode
ENABLE CRLF toggle crlf Enables the sending of carriage returns as Return LF
ENABLE CRMOD toggle crmod Enables the mapping of received carriage returns
ENABLE DEBUG toggle netdata Enables the display of data flow information in hexadecimal
ENABLE
LOCAL_CHARS
toggle localchars 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
toggle options Enables the display of option negotiations between the client and server
SHOW PARAMETERS display Displays the current parameter settings
SHOW SESSION Displays the current sessions
SHOW STATUS status Displays the current status
SET ECHO set echo Sets the echo character to the specified character
SET ERASE set erase Sets the erase character to the specified character
SET ESCAPE set escape Sets the escape character to the specified character
SET
FLUSHOUTPUT
set flushoutput Sets the flush output character to the specified character
SET INTERRUPT set interrupt Sets the interrupt character to the specified character
SET KILL set kill Sets the kill character to the specified character
Customizing the TELNET Environment (Cont.)
SET MODE mode Sets the transmission mode to character or line
SET QUIT 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 send ao Sends the Abort Output command
SEND AYT 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 send brk Sends the Break command
SEND EC send ec Sends the Erase Character command
SEND EL send el Sends the Erase Line command
SEND GA send ga Sends the Go Ahead command
SEND IP send ip Sends the Interrupt character
SEND NOP 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 send synch Sends the Synchronize character

5.1 Typing TELNET/TN3270 Commands

Use the following rules when you type a TELNET command line.

5.1.1 DCL and UNIX 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 

5.1.2 Quotation Marks

No quotation marks are required for typing:

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# 

5.2 Obtaining Online Help

You can obtain online help for the TELNET and TN3270 services by typing one of the following commands:

$ HELP TCP_IP_SERVICES NETWORK_TERMINALS
$ HELP TCP_IP_SERVICES TELNET_COMMAND
$ HELP TCP_IP_SERVICES TN3270_COMMAND

You can also enter the HELP command at the TELNET prompt:

TELNET> HELP

5.3 Starting TELNET and TN3270

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:

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.

5.4 Exiting TELNET and TN3270

You can end a TELNET or TN3270 session (close the connection) in one of the following ways:

$ TELNET FERN 
   .
   .
   .
fern> [Ctrl/]]
 
TELNET> SHOW STATUS  
Session  1 Active  Host FERN 
   .
   .
   .
TELNET> CONNECT GANNET 
   .
   .
   .
gannet> [Ctrl/]] 
 
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/]] 
TELNET> SHOW STATUS 
Session  2 Active  Host GANNET 
    Operating Mode: Character-at-a-time 
    Escape character: '^]'
   .
   .
   .
Session  1 Waiting Host FERN 
TELNET>

5.8 Suspending TELNET to Return to the Local DCL Prompt

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. 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:*

5.9 Multiple Sessions

TELNET supports:

The TELNET SHOW STATUS command helps you keep track of multiple sessions. The SHOW STATUS display uses the terms shown in Table 5-2.

Table 5-2 TELNET SHOW STATUS Display: Terminology
Term Meaning
Active host Host from which you typed the escape sequence to return to the TELNET prompt.
Current session If you log out of the active host at its system prompt, or issue the TELNET DISCONNECT command, no current session exists.

To resume a connection, even if only one exists, issue:
TELNET> RESUME
      n
      
Waiting hosts Other hosts with whom you have open sessions, numbered in the order that you connected to them.

To resume a connection with a waiting host, even if only one exists, issue:
TELNET> RESUME
      n
      

To open another TELNET connection:

  1. At the system prompt of the remote host, press the TELNET escape sequence (default is Ctrl/]).
  2. TELNET returns to the TELNET prompt.
  3. Start another session by issuing the CONNECT command.

The following example starts multiple sessions with UNIX hosts finder and keeper.

$ TELNET FINDER /TERMINAL_TYPE=IBM-3278-2 
   .
   .
   .
finder> 
   .
   .
   .
finder> [Ctrl/]] 
TELNET> CONNECT KEEPER 
   .
   .
   .
keeper> 
   .
   .
   .
keeper> [Ctrl/]] 
TELNET> 

5.9.1 Toggling Between Open Sessions

To toggle from one open TELNET connection to another:

  1. Type 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.

For an example, see Section 5.7.

5.9.2 Displaying 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

5.10 Customizing TELNET/TN3270 Transmissions, Control Characters, and Displays

To customize the TELNET/TN3270 processing environment, issue ENABLE, DISABLE, and SET commands. You can modify how TELNET and TN3270:

You can redefine the following control characters, such as when your terminal or the remote host does not recognize the corresponding default control character.

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). (See Section 5.12.10.)


Previous | Next | Contents