dcd Command

For UNIX: Options and parameters are interchangeable.

For Windows: DCD is on.

The dcd BASIC program toggles or displays the status of data carrier detect on the specified port.

Syntax

dcd {(options}

Parameter(s)

options

port.number

Integer number that displays or changes settings for the port number. If not specified, dcd is toggled on the current port.

f

Toggles dcd off. Data carrier detect is inactive.

n

Toggles dcd on. Data carrier detect is active.

s

Suppresses output of the status message.

x

Displays the current carrier detect status (x is any character other than f, n, or s).

 

WARNING

The serial cabling must carry the dcd signal for this command to operate properly.

For UNIX: When changing the dcd status of another process, a UNIX process must be connected to the D3 virtual machine on the specified PIB, or this error message displays:

dcd 22

dcd: Process is not connected. Cannot change setting.

[1311] Data carrier detect is off.

For Windows: Windows does not have to be connected to the virtual machine when changing the dcd status of another process.

When activated, this protocol allows the system to sense changes in the dcd signal. When the system senses a loss of the dcd signal on a port, it logs the port off.

Without any option, the status of the specified port displays.

This command affects the argument clocal of the terminal driver, when the f option is used.

When the dcd is lost, the process is interrupted by a UNIX HANGUP signal that forces it to execute the TCL command specified by the trap command.

An appropriate cable must be used to connect the system to the modem for the dcd signal to be detected. When the n option is used, the terminal driver is changed to clocal.

Example(s)

Tests the current state of dcd.

dcd

[1311] Data carrier detect is off.

 

dcd ?

[1311] Data carrier detect is off.

 

dcd n

[1310] Data carrier detect is on.

In the example below, no output displays. This example turns off dcd on port 16 and suppresses the output.

dcd 16 fs

See Also

Hangup

list-jobs Macro

modem-off Macro

Port Number

trap Command