HP OpenVMS Systems Documentation

Content starts here

OpenVMS I/O User's Reference Manual

Previous Contents Index Hangup on Logging Out

By default, logging out on a line with modem signals will not break theconnection. If TT2$M_HANGUP is set, modem signals are dropped when theprocess logs out. If TT2$M_MODHANGUP is set, no privilege is requiredto change the state of TT2$M_HANGUP. By setting TT2M_HANGUP, systemmanagers can prevent nonprivileged users who are not logged in fromtying up a dial-in line. Preservation of a Process Across Hangups

Disconnectable terminals allow a connection to a physical terminal lineto be broken without losing the job.

On VAX systems, the following SYSGEN command allows terminals to bedisconnectable terminals:


On Alpha systems, the following SYSMAN command allows terminals to bedisconnectable terminals:


On VAX and Alpha systems, after this command is entered, a terminalwith the TT2$M_DISCONNECT characteristic logs in as VTAn:,rather than with the physical terminal name. When a terminal is set upin this manner, no input or output operations are allowed to thephysical device; I/O is automatically redirected to the appropriatevirtual terminal.

Following are four ways in which a terminal can become disconnected:

  • Modem signals between the host and the terminal are lost.
  • A user presses the BREAK key on a terminal that has the TT2$M_SECURE characteristic.
  • A user enters the DCL command DISCONNECT.
  • A user enters the DCL command CONNECT/CONTINUE.

After validated as a user, you can connect to a disconnected process ineither of the following ways:

  • Allow the login process to make the connection.
  • Enter the DCL command CONNECT.

5.2.4 Terminal/Mailbox Interaction

Mailboxes are virtual I/O devices used to communicate betweenprocesses. The terminal I/O driver can use a mailbox to communicatewith a user process. Chapter 4 describes the mailbox driver.

A user program can use the Assign I/O Channel ($ASSIGN) system serviceto associate a mailbox with one or more terminals. The terminal driversends messages to this mailbox when terminal-related events thatrequire the attention of the user image occur.

Mailboxes used in this way carry status messages, not terminal data,from the driver to the user program. For example, when data is receivedfrom a terminal for which no read request is outstanding (unsoliciteddata), a message is sent to the associated mailbox to indicate dataavailability. On receiving this message, the user program reads thechannel assigned to the terminal to obtain the data. Messages are sentto mailboxes under the following conditions:

  • Unsolicited data in the type-ahead buffer. The use of the associated mailbox can be enabled anddisabled as a subfunction of the read and write requests (see Sections5.4.1 and 5.4.2). (Initially, mailbox messages areenabled on all terminals. This is the default state.) Therefore, theuser process can enter into a dialogue with the terminal after anunsolicited data message arrives. Then, after the dialogue is over, theuser process can reenable the unsolicited data message function on thelast I/O exchange. Only one message is sent between read operations.
  • Terminal hangup.When a remote line loses the carrier signal, it hangs up; a message issent to the mailbox. When hangup occurs on lines that have thecharacteristic TT$M_REMOTE set, the line returns to local mode.
  • Broadcast messages.If the characteristic TT2$M_BRDCSTMBX is set, broadcasts sent to aterminal are placed in the mailbox (this is independent of the state ofTT$M_NOBRDCST).

Messages placed in the mailbox have the following content and format(see Figure 5-2):

  • Message type. The codes MSG$_TRMUNSOLIC (unsolicited data), MSG$_TRMHANGUP (hangup), and MSG$_TRMBRDCST (terminal broadcast) identify the type of message. Message types are identified by the $MSGDEF macro.
  • Device unit number to identify the terminal that sent the message.
  • Counted string to specify the device name.
  • Controller name.
  • Message (for broadcasts).

Figure 5-2 Terminal Mailbox Message Format

Interaction with a mailbox associated with a terminal occurs throughstandard QIO functions and ASTs. Therefore, the process need not haveoutstanding read requests to an interactive terminal to respond to thearrival of unsolicited data. The process need only respond when themailbox signals the availability of unsolicited data. Chapter 4contains an example of mailbox programming.

The ratio of terminals to mailboxes is not always one to one. One userprocess can have many terminals associated with a single mailbox.

5.2.5 Autobaud Detection

If you specify the /AUTOBAUD qualifier with the SET TERMINAL command,automatic baud rate detection is enabled, allowing the terminal baudrate to be set when you log in. The baud rate is set at login bypressing the Return key two or more times separated by an interval ofat least one second. (Pressing a key other than Return might detect thewrong baud rate; if this occurs, wait for the login procedure to timeout before continuing.) The supported baud rates are 110, 150, 300,600, 1200, 1800, 2400, 3600, 4800, 9600, and 19,200. Newer Alphasystems can autobaud up to 57600.Parity is allowed on these lines.

The autobaud function works with either even parity or no parity, butnot with odd parity. If a line is set to even parity and has 7 bits ofdata, the line automatically switches to no parity if a terminal notgenerating parity attempts to log in.

The SET TERMINAL qualifier /EIGHT_BIT specifies that the terminal uses8-bit ASCII code. /NOEIGHT_BIT, which is the default, specifies 7-bitASCII code. (If parity is specified, the parity bit is separate fromthe data bits.) The optimal settings for automatic baud rate detectionon Compaq terminals are /NOEIGHT_BIT/PARITY=EVEN or/EIGHT_BIT/NOPARITY, although automatic baud rate detection also workswith other combinations, such as /NOEIGHT_BIT/NOPARITY.

Table 5-6 describes the terminal characteristic TT2$M_AUTOBAUD,which allows the baud rate to be set automatically at login.

Compaq does not usually recommend specifying the /FRAME qualifier withthe SET TERMINAL command. The terminal driver selects the frame size(the number of data bits that the device can transmit) based on how the/PARITY and /EIGHT_BIT qualifiers are set. It might be necessary tochange these values if the terminal is not made by Compaq.

5.2.6 Out-of-Band Control Character Handling

All control characters (0 through 1F hexadecimal) can be enabled asout-of-band characters. Typing one of these characters immediatelydelivers an AST to the requesting process. DCL uses this mechanism tosense whether Ctrl/T has been entered. Out-of-band character optionsallow using the IO$M_INCLUDE function modifier to include the characterin the data streamand the IO$M_TT_ABORT function modifier to abort the current input oroutput operation.

5.3 Terminal Driver Device Information

You can obtain information on terminal characteristics by using the GetDevice/Volume Information ($GETDVI) system service. (Refer to theOpenVMS System Services Reference Manual.) The sense mode function provides an alternative meansto obtain terminal characteristics; see Section 5.4.5.

$GETDVI returns terminal characteristics when you specify the itemcodes DVI$_DEVCHAR, DVI$_DEVDEPEND, and DVI$_DEVDEPEND2. Tables5-4, 5-5 and 5-6 list thesecharacteristics. Terminal characteristics are normally set duringsystem generation to any one of, or a combination of, the values listedin Table 5-5. DVI$_DEVDEPEND returns a longword field in which thethree low-order bytes contain the device-dependent characteristics andthe high-order byte contains the page length. Page length can have avalue in the range of 0 through 255. The $DEVDEF macro defines thedevice-independent characteristics, the $TTDEF macro defines thedevice-dependent characteristics, and the $TT2DEF macro defines theextended device-dependent characteristics.

DVI$_DEVCLASS and DVI$_DEVTYPE return the device class and device typenames, which are defined by the $DCDEF and $TTDEF macros, respectively.The device class for terminals is DC$_TERM. The terminal modeldetermines the device type. For example, the device type for the VT240is TT$_VT200_SERIES. DVI$_DEVBUFSIZ returns the page width, which canbe a value in the range of 1 through 511. The driver does not accept avalue of 0.

Table 5-4 Terminal Device-Independent Characteristics
Characteristic Meaning
DEV$M_AVL Terminal is on line and available.
DEV$M_CCL Carriage control is enabled.
DEV$M_DET Terminal is detached.
DEV$M_IDV Terminal is capable of input.
DEV$M_ODV Terminal is capable of output.
DEV$M_OPR Terminal is enabled as an operator console.
DEV$M_REC Device is record-oriented.
DEV$M_RTT Terminal has remote terminal UCB extension.
DEV$M_SPL Device is spooled.
DEV$M_TRM Device is a terminal.
DEV$M_NET Terminal line is allocated for DECnet use.

Table 5-5 Terminal Characteristics
Value1 Meaning
TT$M_CRFILL Terminal requires fill after the Return key is pressed (the fill type can be specified by the set mode function P4 argument).
TT$M_EIGHTBIT Terminal uses the 8-bit ASCII character set (see Appendix C). Terminals without this characteristic use the 7-bit ASCII code. In this case, the eighth bit is masked out on received characters and is ignored on output characters. The eighth bit is meaningful only if TT$M_EIGHTBIT is set.
TT$M_ESCAPE Terminal generates escape sequences (see Section Escape sequences are validated for syntax.
TT$M_HALFDUP Terminal is in half-duplex mode (see Section All read and write requests are executed sequentially.
TT$M_HOSTSYNC The host system is synchronized to the terminal. Ctrl/Q and Ctrl/S are used to control data flow and thus keep the type-ahead buffer from filling. TT$M_HOSTSYNC should always be set on LAT terminals.
TT$M_LFFILL Terminal requires fill after the line-feed character is processed. (The fill can be specified by the set mode P4 argument.)
TT$M_LOWER Terminal has the lowercase character set. Unless the terminal is in the PASTHRU mode or IO$M_NOFORMAT is specified, all input and echoed lowercase characters (hexadecimal 61 to 7A) are converted to uppercase if TT$M_LOWER is not set. (The character ALTMODE (decimal 125 and 126, or hexadecimal 7D and 7E) converts to ESCAPE on terminals that do not have the lowercase characteristic TT$M_LOWER set.)
TT$M_MBXDSABL Mailboxes associated with the terminal do not receive notification of unsolicited input or hangup (see Section 5.2.3). This bit can be set by the IO$M_DSABLMBX function modifier for read requests and cleared by the IO$M_ENABLMBX function modifier for write requests.
TT$M_MECHFORM Terminal has mechanical form feed. The terminal driver passes form feeds directly to the terminal instead of expanding to line feeds.
TT$M_MECHTAB Terminal has mechanical tabs and is capable of tab expansion. To accomplish correct line wrapping, the terminal driver assumes there are eight spaces between tab stops.
TT$M_MODEM Terminal line is connected to a modem. If TT$M_MODEM is set, the terminal driver automatically handles modem control. If TT$M_MODEM is not set, all modem signals are ignored. If TT$M_MODEM is set and then cleared, a hangup is declared on the terminal line if that line is in the remote state (TT$M_REMOTE is set). If DTR and RTS are set with IO$_SETMODE!IO$M_SET_MODEM!IO$M_MAINT on a nonmodem port, DTR and RTS goes off and then back on when the port is set for modem.

TT$M_MODEM is not supported for LAT devices.

TT$M_NOBRDCST Terminal does not receive any broadcast messages.
TT$M_NOECHO Input characters are not echoed on this terminal line (see Section
TT$M_NOTYPEAHD Data must be solicited by a read operation. Data is lost if received in the absence of an outstanding read request (if it is unsolicited data). Disables type-ahead feature (see Section If this characteristic is set, login attempts on this line are disabled. See Section for information on modem signal control.
TT$M_READSYNC Read synchronization is enabled. The host explicitly solicits all read operations by entering a Ctrl/Q and terminates the operation by entering a Ctrl/S. TT$M_READSYNC is not applicable to LAT terminals.
TT$M_REMOTE Dialup characteristic is enabled. The terminal returns to local mode when a hangup occurs on the terminal line (see Section 5.2.3). This characteristic cannot be changed; it is only informational.
TT$M_SCOPE Terminal is a video screen display (CRT terminal), for example, the VT100 or VT240 terminals.
TT$M_TTSYNC The terminal is synchronized to the host system. Output to the terminal is controlled by terminal-generated Ctrl/Q or Ctrl/S. TT$M_TTSYNC is not applicable to LAT terminals unless TT$M_PASTHRU is set and TT$M_TTSYNC is disabled, in which case the LAT session is placed in PASSALL mode.
TT$M_WRAP A carriage-return/line-feed combination should be inserted if the cursor moves beyond the right margin. If TT$M_WRAP is not set, no carriage-return/line-feed combination is sent. The operating system does not support hardware-provided wrapping functions.

1Defined by the $TTDEF macro. The prefix can be TT$M_ orTT$V_. TT$M_ is a bit mask whose bit corresponds to the specific field;TT$V_ is a bit number.

Table 5-6 Extended Terminal Characteristics
Value1 Meaning
TT2$M_ALTYPEAHD Alternate type-ahead buffer size is enabled. Use the alternate type-ahead buffer size specified during system generation (see Section If a type-ahead buffer already exists for a terminal line, there is no effect when this characteristic is set for that line. TT2$M_ALTYPEAHD should be set prior to using the terminal, such as in the startup command procedure. You can only set TT2$M_ALTYPEAHD; this characteristic cannot be cleared until the system is rebooted.
TT2$M_ANSICRT ANSI CRT terminal is enabled. This characteristic is set by the SET TERMINAL command. TT2$M_ANSICRT is a subset of the ANSI standard with no DIGITAL private escape sequences (see Appendix C). It is also a subset of the VT100 family terminals (because TT2$M_ANSICRT is a subset of TT2$M_DECCRT) and the VT100. Terminals with this characteristic must provide a display of at least 24 lines, each with 80 columns.
TT2$M_APP_KEYPAD Notifies application programs of state to set the keypad to when exiting.
TT2$M_AUTOBAUD Automatic baud rate detection is enabled. This characteristic allows the baud rate to be set automatically when you log in. (The baud rate is set when one or more carriage returns are entered during the login procedure.) Terminals are set to a permanent speed of 9600 baud. If TT2$M_AUTOBAUD is specified, the permanent speed must not be changed while this characteristic is in use on a given terminal line. See Section 5.2.5 for additional information on automatic baud rate detection.
TT2$M_AVO Advanced video is enabled. This characteristic provides the terminal with blink, bold, and flashing fields as well as a full screen of 132 character lines. TT2$M_AVO is set by the SET TERMINAL command. Appendix C lists the valid escape sequences for terminals with the TT2$M_AVO characteristic.
TT2$M_BLOCK Block mode is enabled. This characteristic is set by the SET TERMINAL command. TT2$M_BLOCK defines additional ANSI-defined and DIGITAL private escape sequences (see Appendix C). Terminals with this characteristic are capable of local editing and block mode transmission (XON/XOFF flow control must be honored), and have protected fields. If the terminal is used for large amounts of block input, TT2$M_ALTYPEAHD should also be specified.
TT2$M_BRDCSTMBX Mailbox broadcasts messages. Broadcast messages are sent to an associated mailbox, if one exists.
TT2$M_COMMSYNC Enables devices such as asynchronous printers to be connected to terminal ports. Flow control is handled by EIA modem signals instead of XON/XOFF. Setting TT2$M_COMMSYNC activates the DTR and RTS signals; data is sent once the DSR and CTS signals are also present. If either of these signals is not present, printing stops. When both signals are present again, printing resumes.

Do not set TT2$M_COMMSYNC on a line connected to a modem that is intended for interactive use. TT2$M_COMMSYNC disables the modem terminal characteristic that disconnects a user process from the terminal line in case of a modem phone line failure. With TT2$M_COMMSYNC set, the next call on the terminal line could be attached to the previous user's process. TT2$M_COMMSYNC should also not be used in combination with XON/XOFF, TT$M_TTSYNC, or TT$M_HOSTSYNC. TT2$M_COMMSYNC and TT$M_MODEM are mutually exclusive.

TT2$M_DECCRT DIGITAL CRT terminal. This characteristic is set by the SET TERMINAL command for all terminals that are upward-compatible with VT100 family terminals. TT2$M_DECCRT is a superset of TT2$M_ANSICRT. Additional ANSI-defined as well as most DIGITAL private escape sequences are allowed for terminals with this characteristic (see Appendix C); maintenance modes, VT52 mode, and the use of the LED displays are not defined by TT2$M_DECCRT. Not all VT100 family terminals implement these features. The presence of the advanced video feature cannot be assumed because it is a VT100 option. This restricts the use of graphics attributes. However, the TT2$M_AVO characteristic can be used to determine whether additional graphic attributes are available.
TT2$M_DECCRT2 DIGITAL CRT terminal. This characteristic is set by the SET TERMINAL command for all terminals that are upward-compatible with VT200 family terminals. TT2$M_DECCRT2 is a superset of TT2$M_DECCRT.
TT2$M_DECCRT3 DIGITAL CRT terminal. This characteristic is set by the SET TERMINAL command for all terminals that are upward-compatible with VT300 family terminals. TT2$M_DECCRT3 is a superset of TT2$M_DECCRT2.
TT2$M_DECCRT4 DIGITAL CRT terminal. This characteristic is set by the SET TERMINAL command for all terminals that are upward-compatible with VT400 family terminals. TT2$M_DECCRT4 is a superset of TT2$M_DECCRT3.
TT2$M_DIALUP Terminal is a dialup line. Used by LOGINOUT for the disable dialup control.
TT2$M_DISCONNECT Allows terminal disconnect when a hangup occurs (that is, when modem signals are lost, when the DCL commands DISCONNECT or CONNECT/CONTINUE are entered, or when the BREAK key is pressed on a terminal that has the TT2$M_SECURE characteristic). These terminals are created as VTA n:. (Refer to the description for the DCL command CONNECT/DISCONNECT in the OpenVMS DCL Dictionary.)
TT2$M_DMA Direct memory access (DMA) mode. This characteristic enables the use of DMA mode for asynchronous DMA multiplexers. It is ignored by non-DMA controllers.
TT2$M_DRCS Terminal supports loadable character fonts. This characteristic is set with the DCL command SET TERMINAL/SOFT_CHARACTERS.
TT2$M_EDIT Terminal edit. This characteristic is set by the SET TERMINAL command for all terminals that support ANSI-defined advanced editing functions. These functions include the ability to insert or delete a line and the ability to insert or delete characters in an existing line. Terminals with this characteristic are a superset of TT2$M_DECCRT. Appendix C lists the valid escape sequences for terminals with the TT2$M_EDIT characteristic.
TT2$M_EDITING Line editing is allowed.
TT2$M_FALLBACK 2 Output is transformed from the 8-bit multinational character set to a 7-bit ASCII character set on terminals that do not support the 8-bit character set (see Appendix C).
TT2$M_HANGUP Terminal hangup. Terminal lines connected through modems are hung up when a process logs out or is deleted. The state of this characteristic cannot be changed unless TT2$M_MODHANGUP is enabled or the process has either LOG_IO or PHY_IO privilege.
TT2$M_INSERT Sets default mode for insert or overstrike at the beginning of each read operation.
TT2$M_LOCALECHO Local echo. This characteristic is used with TT$M_NOECHO. If both characteristics are set, only terminators and special control characters are echoed. Use of this mode is restricted to command-line read operations. Application programs that use the IO$M_NOECHO function modifier will not necessarily work if TT2$M_LOCALECHO is set. Local echo is also not compatible with line editing (TT2$M_EDITING).
TT2$M_MODHANGUP Modify hangup. If specified, TT2$M_HANGUP can be modified without privilege. Otherwise, logical or physical I/O privilege is required.
TT2$M_PASTHRU Terminal is in PASTHRU mode; all input and output data is in 7- or 8-bit binary format (no data interpretation occurs). Data is terminated when the buffer is full or when the data that is read matches the specified terminator. If the characteristic TT$M_TTSYNC is set, Ctrl/S and Ctrl/Q interpretation does occur.
TT2$M_PRINTER DIGITAL CRT terminal with a local printer port.
TT2$M_REGIS ReGIS graphics. The terminal supports the ReGIS graphics instruction set.
TT2$M_SIXEL SIXEL graphics. The terminal supports the SIXEL graphics instruction set.
TT2$M_SECURE For use with nonmodem, nonautobaud lines. This characteristic guarantees that no process is connected to the terminal after the BREAK key is pressed. If TT2$M_SECURE is not set, BREAK is a null key.
TT2$M_SETSPEED Set speed. If specified, either LOG_IO or PHY_IO privilege is required to change terminal speed. TT2$M_SETSPEED is not supported for LAT devices.
TT2$M_SYSPWD System password. This characteristic specifies that the login procedure should require the system password before the user name prompt is displayed.
TT2$M_XON XON/XOFF control. If a set mode function is performed on a terminal in the Ctrl/S state, and if TT2$M_XON is set, output is resumed. Users should note that the driver will attempt to resume stopped (XOFF) output on the line. However, restarting the output may not be successful in all cases. The XON/XOFF feature does not work on all terminals, for example, the VT220.

1Defined by the $TT2DEF MACRO. The prefix can be TT2$M_ orTT2$V_. TT2$M_ is a bit mask in which the bit set corresponds to thespecific field; TT2$V_ is a bit number.
2If an attempt is made to turn on TT2$V_FALLBACK for adisconnected virtual terminal (_VTAx:) or if the Terminal FallbackFacility (TFF) has not been activated, the status code SS$_BADPARAM isreturned. For more information on TFF, refer to the OpenVMS Terminal Fallback Utility Manual(available on the Documentation CD-ROM).

Previous Next Contents Index