New Enterprise Co:Z Release 8.1.0 is available. Review the Release Notes and Download.
New Enterprise Co:Z Release 8.1.0 is available.

z/OS Remote Services Processing Model

View a ten minute video: Introduction to z/OS Remote Services View recording

When using z/OS Remote Services, a Linux, AIX or remote z/OS system can use the Dataset Pipes client commands to initiate a SSH connection to a z/OS server, starting the SSH server subsystem (dspipes) to access z/OS services. Commands can be run individually (each with its own SSH connection), or through a durable connection initiated by the remote system via the cozcontrol command. z/OS Remote Services enable z/OS services and data to be incorporated into standard workloads running on AIX or Linux.

With the following Co:Z Dataset Pipes commands, shell scripts running on AIX or Linux can remotely run z/OS commands and access z/OS data:

  • fromdsn/todsn - read/write a z/OS DD or data set
  • fromfile/tofile - read/write a z/OS Unix file
  • cozclient - run z/OS Unix command

These commands can be run individually (each with its own SSH connection) or share a server connection. For example:

  • with SSH connection information on the command line:
    fromdsn -ssh user@host 'hlq.dsn' > /home/user/mydata/data1.txt
    fromdsn -ssh user@host 'hlq.dsn' > \
    /home/user/mydata/data1.txt

    In this mode, the command is executed over the SSH connection using the Dataset Pipes SSH server subsystem to access z/OS Datasets and POSIX files.

  • through a durable connection via the cozcontrol command:
    cozcontrol start -ssh user@host 
    fromdsn 'hlq.dsn.data1' > /home/user/mydata/data1.txt
    todsn 'hlq.dsn.data2' < /home/user/mydata/data2.txt
    cozclient wto "message to console"
    cozcontrol stop
    cozcontrol start -ssh user@host 
    fromdsn 'hlq.dsn.data1' > \
       /home/user/mydata/data1.txt
    todsn 'hlq.dsn.data2' < \
       /home/user/mydata/data2.txt
    cozclient wto "message to console"
    cozcontrol stop

    In this mode, the cozcontrol start command is executed over the SSH connection to the Dataset Pipes SSH server subsystem. The Dataset Pipes subsystem starts a socket server to listen and process commands. Subsequent commands (in the above example: fromdsn, todsn, and cozclient) retrieve connection properties from cozcontrol, use this information to establish a socket connection to the socket server, and execute the command on the server. On completion of the script, cozcontrol stop runs to shutdown the socket server and 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 cozcontrol start.

    In both modes, the SSH connection remains established until either a cozcontrol stop command is executed or an inactivity timeout on the server occurs.