dcd command

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

For UNIX: Options and parameters are interchangeable.

For Windows: DCD is on.


 dcd {(options}


options port.number Integer number that displays or changes settings for the port number.

If not specified, the dcd command is set on the current port.

f Sets the dcd command to Off.

Data carrier detect is inactive.

n Sets the dcd command to 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 you will see this error message:

 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, you will see the status of the specified port.

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 1

Tests the current state of dcd.

 [1311] Data carrier detect is off.

Example 2

 dcd ?
 [1311] Data carrier detect is off.

Example 3

 dcd n
 [1310] Data carrier detect is on.

Example 4

In this example, there is no output. This example turns off dcd on port 16 and suppresses the output.

 dcd 16 fs