The installation steps vary depending on the usage of the Dataset Pipes commands.
z/OS Unix System Services Integration:
Follow the instructions for Co:Z Toolkit for z/OS. Because the Dataset Pipes commands are only running on z/OS, no additional configuration is needed. There is no specific Dataset Pipes configuration.
z/OS Hybrid Batch:
When Dataset Pipes commands are run with the Co:Z Launcher in a z/OS Hybrid Batch use case, installation is required for the Co:Z Toolkit for z/OS and the Co:Z Target System Toolkits. No specific Dataset Pipes configuration is required, but see the Co:Z Launcher User's Guide for additional configuration options.
z/OS Remote Services:
In addition to the Co:Z Toolkit for z/OS and Co:Z Target System Toolkits, the dspipes subsystem and dspipes session config options must also be configured. See the following sections for more detail.
After completing the installation of the Co:Z Toolkit for z/OS and the Co:Z Target System Toolkit on the remote system, the following are the minimum steps to get started using z/OS Remote Services. Replace <COZ_INST> with the installation directory of the toolkit. For more detailed information, see the remaining sections in this chapter.
On z/OS:
- Edit
/etc/ssh/sshd_config
and add the following line along with other subsystem configuration.Subsystem dspipes <COZ_INST>/bin/dspipes.sh
Restart SSHD.kill -HUP `cat /var/run/sshd.pid`
- Copy the sample configuration files to
/etc/ssh
:cp <COZ_INST>/samples/dspipes.site.rc /etc/ssh/dspipes.rc chmod 755 /etc/ssh/dspipes.rc cp <COZ_INST>/samples/dspipes_site_config /etc/ssh/dspipes_config chmod 0644 /etc/ssh/dspipes_config
- Edit
/etc/ssh/dspipes_config
. Uncomment and setserver-host
to an externally recognized IP address or hostname for the z/OS server. Uncomment and setserver-ports
, if the default is not applicable.
On the remote system:
Assuming the Co:Z Target System Toolkit has been installed on a unix server with the PATH configured to the Dataset Pipes command executables:
- Verify that the remote system can connect to the z/OS server using SSH.
ssh user@host uname -a
- Interactively test a Dataset Pipes command with a single SSH connection. This command lists the files in the user's z/OS home directory.
cozclient -ssh user@host ls -alt
- Interactively start a durable connection using cozcontrol, execute a few Dataset Pipes commands on z/OS, and end the session.
cozcontrol start -ssh user@host cozclient ls -alt fromdsn 'SYS1.MACLIB(ACB)' > /tmp/test.txt todsn 'user.test.dataset' < /tmp/test.txt cozcontrol stop
For more examples, see Appendix A, Command Reference - Dataset Pipes and Chapter 4, z/OS Remote Services Examples.
This section provides additional detail about the steps summarized in the quick start section above.
To run Dataset Pipes commands initiated by a remote client, a subsystem must be configured in your z/OS OpenSSH server.[1]
This is done by updating the sshd_config
file, typically located at
/etc/ssh/sshd_config
.[2]
Find the line "Subsystem" which defines the sftp
subsystem. Immediately following
the sftp line add this:
Subsystem dspipes <COZ_INST>/bin/dspipes.sh
(where <COZ_INST> is the directory where Co:Z Toolkit is installed).
If OpenSSH sshd was running prior to editing
sshd_config
, it should be reinitialized. This can be done by sending
SIGHUP
to the running process. The pid for this process is typically in
the file /var/run/sshd.pid
:
kill -HUP `cat /var/run/sshd.pid`
The following table describes how a Co:Z Dataset Pipes Server session is started and outlines the sequence of configuration steps that occur prior to the establishment of the session. Details on these configuration steps follow the table.
The Dataset Pipes server can be configured with
system-wide defaults by creating and configuring the file /etc/ssh/dspipes.rc
.
A sample file (dspipes.site.rc
) is provided in <COZ_INST>/samples
, and should be copied to
the /etc/ssh
directory:
cp <COZ_INST>/samples/dspipes.site.rc /etc/ssh/dspipes.rc chmod 755 /etc/ssh/dspipes.rc
#!/bin/sh # Set site-wide environment variables for dspipes server. # Place this sample as an executable script in file: /etc/ssh/dspipes.rc # The following are the default locations for user level configuration files. #DSPIPES_USER_RC=$HOME/.ssh/dspipes.rc #DSPIPES_USER_CONFIG=$HOME/.ssh/dspipes_config # The following defines a directory name (without trailing slash) where # log files will be created, rather than /tmp or $TMPDIR. Setting this # variable and regular cleanup of this directory are recommended. #export DSPIPES_LOGDIR=
In some cases, users may not have access to individual To disable the usage of user specific dspipes.rc files for all users,
Note that the z/OS Unix System Services | |
Additionally, individual user server config files can be similarly
located. To learn more about config files, refer to section:
Section 2.4, “z/OS Remote Services Session Config Files”. By default, user server config files are located at
|
Note: The /etc/ssh/dspipes.rc
, if present, must be marked executable, as must the
individual user files.
Individual users can override system wide Dataset Pipes properties by
creating a profile script, dspipes.rc
, in their home .ssh directory:
# if the user's .ssh does not exist: mkdir $HOME/.ssh chmod 700 $HOME/.ssh cp <COZ_INST>/samples/dspipes.user.rc $HOME/.ssh/dspipes.rc chmod u+x $HOME/.ssh/dspipes.rc
#!/bin/sh # Place this sample as an executable script in file: $HOME/.ssh/dspipes.rc # Product support personnel may request that you uncomment one or more of # the following variables to enable tracing. These options should be set # in user specific dspipes.rc files rather than globally in the site-wide # dspipes.rc # Setting COZ_LOG enables tracing for CozServer session level tracing. # The default is N, Notice. #export COZ_LOG=T # Setting COZ_LOG_CMD enables tracing for dspipes commands running on the # server (fromdsn, cozclient, etc). The default is N, Notice. Command # tracing can alternately be enabled with the -L option on most dataset # pipes commands. #export COZ_LOG_CMD=F # Setting COZ_LOG_CMD_DUP to true (default is false), duplicates tracing enabled by # COZ_LOG_CMD to the session log. This is recommended when requesting support from # Co:Z support personnel because all logging for a problem is captured in a single # file. #export COZ_LOG_CMD_DUP=true
When logging is enabled by setting this variable, log files are created for every Dataset Pipes server session. Each session is an SSH session. See the section called “Logging Configuration for Dataset Pipes” for additional information. | |
When command logging is enabled by setting this variable, Co:Z logging messages are redirected back to the client for all Dataset Pipes commands
executed by the client. The optional | |
When set to |
Log files are created for every Dataset Pipes server session. When specifying
-ssh
on an individual Dataset Pipes command such as fromdsn, the log file contains logging only for the single command.
When using cozcontrol to define a durable session used by multiple Dataset Pipes commands, the log file contains logging for all commands
using the durable session. If the log file remains empty due to the logging level set, the file is deleted when the session ends.
The log file is of particular interest when a problem is encountered and additional error detail is needed. The following sections define how to control
the logging destination as well as logging levels.
By default, log files are written to
the /tmp
directory (or the directory specified by the TMPDIR
environment variable, if
it is set). To change this directory default for all users, modify /etc/ssh/dspipes.rc
as needed.
Exporting DSPIPES_LOGDIR
changes the directory log files are written to. The session log file name is
generated with the following pattern: dspipes.<userid>.<...>.log
.
The directory containing the log files must be cleaned up and monitored for space; however, it is important to keep these files for some period of time in order to allow support personnel to review the session log file for diagnostic information when investigating a problem.
In order to assist with log file maintenance, the environment variable DSPIPES_LOG_KEEP_DAYS
can be exported from either the site or
individual user's dspipes.rc
. When this variable is specified, the argument must be an integer greater than zero. Log files older than the
argument will be removed when the user next establishes a Co:Z Dataset Pipes server session. The log files to be deleted must belong to the the connecting user
and reside in the immediate directory specified by DSPIPES_LOGDIR
(or $TMPDIR
if DSPIPES_LOGDIR is not specified). Note that if
DSPIPES_LOGFILE
is specified, DSPIPESP_LOG_KEEP_DAYS
(if set) will be ignored.
The logging level is controlled by exporting the following environment variables: COZ_LOG
, COZ_LOG_CMD
, and COZ_LOG_CMD_DUP
.
In order to diagnose a problem for an individual user, create a dspipes.rc
file in their individual .ssh
directory, setting these
variables as directed by product support personnel.
COZ_LOG
When set, enables Dataset Pipes server level logging, excluding logging of the server side execution of Dataset Pipes commands (fromdsn, todsn, cozclient, etc.).
When the
COZ_LOG
environment variable is not specifically set, the default isN
which logs error, warning and notice messages. The Co:Z support team may direct setting this variable to one of E, W, N, I, D, T or F for Error, Warning, Notice, Informational, Debug, Trace, or Fine level tracing.COZ_LOG_CMD
When set, enables logging of the server side execution of Dataset Pipes commands (fromdsn, todsn, cozclient, etc.). Logging for Dataset Pipes commands is redirected back to the client as stderr. Alternatively, logging can be configured for a specific Dataset Pipes command by specifying the
-L
option on the command. See Appendix A, Command Reference - Dataset Pipes for additional information.When the
COZ_LOG_CMD
environment variable is not specifically set, the default isN
which logs error, warning and notice messages. The Co:Z support team may direct setting this variable to one of E, W, N, I, D, T or F for Error, Warning, Notice, Informational, Debug, Trace, or Fine level tracing.COZ_LOG_CMD_DUP
The default for this variable is
false
. Setting this variable totrue
duplicates Dataset Pipes command stderr to the client and the server session log. Setting this option totrue
in a user'sdspipes.rc
file captures the most complete set of information in one server session log file.
The file /etc/ssh/dspipes_config
can be used to customize the options available for a cozcontrol
durable session. The permissions for this file should be 0644
. While user's can override these properties, they are
intended to be site-wide properties.
A sample file (dspipes_site_config
) is provided in <COZ_INST>/samples
, and should be copied to
the /etc/ssh
directory:
cp <COZ_INST>/samples/dspipes_site_config /etc/ssh/dspipes_config chmod 644 /etc/ssh/dspipes_config
Table 2.2. Durable session Dataset Pipes server properties
|
[1] SSH user subsystems are, like all SSH remote commands, executed in a process under the authenticated client userid, so normal z/OS user security determines what resources can be accessed.
[2] It is sometimes convenient to set up a test OpenSSH server where this subsystem can be easily added. Instructions for doing this can be found in the Co:Z Installation and Release Notes.