cozcontrol — start/stop a durable connection to the Dataset Pipes subsystem on a target server
cozcontrol start [
[user]@hostcozcontrol stop cozcontrol
The cozcontrol command starts and stops a durable connection to the Dataset Pipes subsystem on a target server.
When starting a durable session, the cozcontrol start command is executed over the specified SSH connection to the Dataset Pipes SSH server subsystem on the target server. The Dataset Pipes subsystem starts a socket server to listen and process commands. Subsequent commands (fromdsn, todsn, cozclient, etc) retrieve connection properties from cozcontrol, use this information to establish a socket connection to the socket server, and execute the command on the server. The durable session ends when the cozcontrol stop command is issued (or an inactivity timeout occurs on the server) causing the socket server to shutdown and ending the SSH connection.
Alternatively, the cozcontrol command can be started with a tunneled option (
-t). In this case, the initial SSH connection is
configured as a control master with local port forwarding. Subsequent Dataset Pipes commands are forwarded to the server over the SSH connection established by
In both modes, the SSH connection remains established until either a cozcontrol stop command is executed or an inactivity timeout on the server occurs.
A user may set up concurrent durable sessions to multiple user/host pairs; however, not multiple sessions to the same user/host pair. To identify
which durable session to use, set the environment variable
user@host prior to executing Dataset Pipes and cozcontrol stop commands.
Starts a durable connection to the Dataset Pipes subsystem on a target server.
The cozcontrol start process runs in the background until a stop command is issued. If the terminal running the start command ends, the cozcontrol start process and its child SSH process will continue to run until the timeout occurs in the z/OS dspipes subsystem. This timeout value is configurable in
Specifies that the cozcontrol durable connection be tunneled. In this case, the initial SSH connection is configured as a control master. Subsequent Dataset Pipes commands are forwarded over the SSH connection. The
-toption is not set by default. When set, the environment variable
COZ_CONTROL_PATHsets the control path. By default, the control path is
~/.ssh/cm-%r@%h:%p.sock. This option can only be spectified after the start keyword.
OpenSSH 5.6 or later is required.
Specifies the ssh connection to the given z/OS user@host for the cozcontrol start command. This option is required and only permitted with the start keyword.
Stops a durable connection to the Dataset Pipes subsystem on a target server.
display help and exit.
display the current version and exit.
Execute Dataset Pipes commands in a durable session
cozcontrol start -ssh user@host
fromdsn 'hlq.dsn' > /home/user/mydata/data1.txt
todsn 'hlq.dsn' < /home/user/mydata/data2.txt
cozclient wto "message to console"
This example shows a durable session started for
user@host. The next three commands (fromdsn, todsn, and cozclient) are executed over the socket connection established by cozcontrol start. Once the commands are complete, cozcontrol stop causes the socket connection to shutdown and the SSH connection to end.