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.
$ 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.
$ 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.
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.
|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||
|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:
To use TELNET, issue the commands summarized in Table 5-1 (for complete command descriptions, see Section 5.13).
|Starting (at the DCL Prompt)|
|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|
|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|
|toggle localchars||Disables the interpretation of certain control characters by your local TELNET client and passes them to the remote TELNET server|
|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|
|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|
|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||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|
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
No quotation marks are required for typing:
$ TELNET CENTRAL
$ TN3270 CENTRAL
TELNET> CONNECT CENTRAL
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 ...22.214.171.124 %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#
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:
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:
The following example shows two ways to close connections:
% logout %TELNET-S-REMCLOSED, Remote connection closed TELNET> EXIT $ % [Ctrl/]] TELNET> DISCONNECT %TELNET-S-REMCLOSED, Remote connection closed TELNET> EXIT $
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
You can create a command procedure containing the DCL DEFINE and TELNET (or TN3270) commands.
The following example shows an example of a TELNET command procedure.
$! My TELNET startup command file, START_TELNET.COM. $! $! This command procedure establishes a TELNET session $! with UNIX host central. $! $ DEFINE /USER_MODE SYS$INPUT TT: $ TELNET CENTRAL
Initialization command files can customize your TELNET/TN3270 sessions with SET, ENABLE, and DISABLE commands. These command files:
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"
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.
TELNET> RESUME n
TELNET> SET ESCAPE escape_character
The following example toggles between remote UNIX host biway and the local OpenVMS system.
biway> [Ctrl/]] TELNET> SHOW STATUS Session 1 Active Host BIWAY Operating Mode: Character-at-a-time Escape character: '^]' Options: . . . TELNET> [Return] biway>
In the next example, user BENTLEY, working at OpenVMS node EAGLE, uses TELNET to do the following:
$ 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...126.96.36.199 %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>
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:*
The TELNET SHOW STATUS command helps you keep track of multiple sessions. The SHOW STATUS display uses the terms shown in Table 5-2.
|Active host||Host from which you typed the escape sequence to return to the TELNET prompt.|
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
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:
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>
To toggle from one open TELNET connection to another:
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
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.)