[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS DCL Dictionary


Previous Contents Index


CONNECT

Connects your physical terminal to a virtual terminal that is connected to another process.

You must connect to a virtual terminal that is connected to a process with your user identification code (UIC). No other physical terminals may be connected to the virtual terminal.


Format

CONNECT virtual-terminal-name


Parameter

virtual-terminal-name

Specifies the name of the virtual terminal to which you are connecting. A virtual terminal name always begins with the letters VTA. To determine the name of the virtual terminal that is connected to a process, enter the SHOW USERS command.

Description

The CONNECT command connects you to a separate process, as opposed to the SPAWN and ATTACH commands, which create and attach subprocesses.

The CONNECT command is useful when you are logged in to the system using telecommunications lines. If there is noise over the line and you lose the carrier signal, your process does not terminate. After you log in again, you can reconnect to the original process and log out of your second process.

To use the CONNECT command, the virtual terminal feature must be enabled for your system with the System Manager utility (SYSMAN) on OpenVMS Alpha systems.

If virtual terminals are allowed on your system, use the SET TERMINAL/DISCONNECT/PERMANENT command to enable the virtual terminal characteristic for a particular physical terminal. When you enable this characteristic, a virtual terminal is created when a user logs in to the physical terminal. The physical terminal is connected to the virtual terminal, which is in turn connected to the process.

For new virtual terminals, you must first set the TT2$V_DISCONNECT bit in the TTY_DEFCHAR2 system parameter and reboot the system. This is done by creating the virtual device VTA0: using the ttdriver. For example, on Alpha:


$ RUN SYS$SYSTEM:SYSMAN 
SYSMAN> IO CONNECT/NOADAPTER/DRIVER=SYS$LOADABLE_IMAGES:SYS$TTDRIVER VTA0: 

When the connection between the physical terminal and the virtual terminal is broken, you are logged out of your current process (and any images that the process is executing stop running) unless you have specified the /NOLOGOUT qualifier.

If you have specified the /NOLOGOUT qualifier, the process remains connected to the virtual terminal. If the process is executing an image, it continues until the process needs terminal input or attempts to write to the terminal. At that point, the process waits until the physical terminal is reconnected to the virtual terminal.

You can connect to a virtual terminal even if you are not currently using a virtual terminal; however, to log out of your current process you must use the CONNECT command with the /LOGOUT qualifier. If you connect to a virtual terminal from another virtual terminal, you can save your current process by using the /NOLOGOUT qualifier.


Qualifiers

/CONTINUE

/NOCONTINUE (default)

Controls whether the CONTINUE command is executed in the current process just before connecting to another process. This qualifier allows an interrupted image to continue processing after you connect to another process.

The /CONTINUE qualifier is incompatible with the /LOGOUT qualifier.

/LOGOUT (default)

/NOLOGOUT

Logs out your current process when you connect to another process using a virtual terminal.

When you enter the CONNECT command from a process that is not connected to a virtual terminal, you must specify the /LOGOUT qualifier; otherwise, DCL displays an error message.

The /LOGOUT qualifier is incompatible with the /CONTINUE qualifier.


Examples

#1

$ RUN AVERAGE
[Ctrl/Y]
$ CONNECT/CONTINUE VTA72
      

In this example, you use the RUN command to execute the image AVERAGE.EXE. You enter this command from a terminal that is connected to a virtual terminal. Next, you press Ctrl/Y to interrupt the image. After you interrupt the image, enter the CONNECT command with the /CONTINUE qualifier. This operation issues the CONTINUE command, so the image continues to run and connects you to another virtual terminal. You can reconnect to the process later.

#2

$ SHOW USERS/FULL
     OpenVMS User Processes at 21-JUL-2009 14:11:56.91 
   Total number of users = 51,  number of processes = 158 
 
Username    Node   Process Name       PID     Terminal 
KIDDER     BUKETT  KIDDER           29A0015E  FTA3: 
KIDDER     BUKETT  _FTA4:           29A0015F  FTA4: 
KIDDER     RACEY1  KIDDER           05800062  FTA5: 
KIDDER     RACEY1  DECW$MWM         0580005D  MBA44:   Disconnected 
KIDDER     RACEY1  DECW$SESSION     05800059 
KIDDER     RACEY1  VUE$KIDDER_2     0580005E  (subprocess of 05800059) 
KIDDER     RACEY1  VUE$KIDDER_3     0580005F  MBA51:   Disconnected 
KIDDER     RACEY1  VUE$KIDDER_4     05800060  MBA53:   Disconnected 
SMITH      BUKETT  SMITH            29A002C1  FTA7: 
SMITH      BUKETT  SMITH_1          29A006C2  (subprocess of 29A002C1) 
SMITH      BUKETT  SMITH_2          29A00244  (subprocess of 29A002C1) 
SMITH      HAMLET  SMITH            24800126  FTA6: 
SMITH      HAMLET  DECW$BANNER      24800155  (subprocess of 24800126) 
SMITH      HAMLET  DECW$MWM         2480011F  MBA170:  Disconnected 
SMITH      HAMLET  DECW$SESSION     2480011D  FTA5: 
. 
. 
.
 
$ CONNECT VTA273
  SMITH         logged out at 22-DEC-2001 14:12:04.53
$
      

This example shows how to reconnect to your original process after you have lost the carrier signal. First, you must log in again and create a new process. After you log in, enter the SHOW USERS/FULL command to determine the virtual terminal name for your initial process. Then enter the CONNECT command to connect to the virtual terminal associated with your original process. The process from which you enter the CONNECT command is logged out because you have not specified any qualifiers.

When you reconnect to the original process, you continue running the image that you were running when you lost the carrier signal. In this example, the user SMITH was at interactive level when the connection was broken.


Previous Next Contents Index