Universal Command Manager for z/OS

Universal Command Manager for z/OS

Overview

This page provides information on Universal Command (UCMD) Manager specific to the z/OS operating system.

UCMD Manager executes commands on any computer running the UCMD Server component.

You indicate to the UCMD Manager what command(s) to execute and how the standard input and output and error data should be processed. The UCMD Manager connects to the UCMD Server and processes your request.

The z/OS Batch Manager provides a batch job interface to remote computers running the UCMD Server component. The UCMD Manager executes remote commands as they would be if you entered them directly on the remote command line. Standard input and output and error files are supplied using JCL DD statements.

UCMD Manager registers with a locally running Universal Broker. Consequentially, a Universal Broker must be running in order for a UCMD Manager to execute.

Usage

UCMD Manager for z/OS executes as a batch job. It consists of:

  • Batch JCL

  • Configuration options

This section describes the JCL, configuration and configuration options, and command line syntax of UCMD Manager for z/OS.

JCL Procedure

The following figure illustrates the UCMD Manager for z/OS JCL procedure (UCMDPRC, located in the SUNVSAMP library) that is provided with the Universal Agent for z/OS installation to simplify the execution JCL and future maintenance.

 

HTML


The procedure provides the parameters STDIN, STDOUT, and STDERR to specify the stdin, stdout, and stderr files, respectively, of the remote command.

The UPARM parameter is used to specify EXEC PARM keyword values for the UCMD program. The PARM values to the left of the slash ( / ) character are IBM Language Environment parameters.

For information regarding the Time Zone (TZ) environment variable, see z/OS Installation - Time Zone Environment Variable.

The UCMDPRE parameter specifies the data set name prefix of Universal Agent installation data sets.

DD Statements Used in JCL Procedure

The following table describes the DD statements used in the UCMD Manager for z/OS JCL procedure, above.

ddname

DCB Attributes *

Mode

Description

ddname

DCB Attributes *

Mode

Description

STEPLIB

DSORG=PO,
RECFM=U

input

Universal Agent load library containing the program being executed.

UNVNLS

DSORG=PO,
RECFM=(F, FB, V, VB)

input

Universal Agent national language support library. Contains message catalogs and code page translation tables.

UNVTRACE

DSORG=PS,
RECFM=(F, FB, V, VB)

output

UCMD trace output.

UNVOUT

DSORG=PS,
RECFM=(F, FB, V, VB)

output

Remote command's stdout file. When the remote command writes to its stdout file, this is the file to which it writes.

UNVERR

DSORG=PS,
RECFM=(F, FB, V, VB)

output

Remote command's stderr file. When the remote command writes to its stderr file, this is the file to which it writes.

UNVIN

DSORG=PS,
RECFM=(F, FB, V, VB)

input

Remote command's stdin file. When the remote command reads from its stdin file, this is the file from which it reads.

SYSPRINT

DSORG=PS,
RECFM=(F, FB, V, VB)

output

Standard output file for the UCMD program. UCMD does not write any messages to SYSPRINT.

SYSOUT

DSORG=PS,
RECFM=(F, FB, V, VB)

output

Standard error file for the UCMD program. UCMD writes its messages to SYSOUT.

* The C runtime library determines the default DCB attributes. See the IBM manual OS/390 C/C++ Programming Guide for details on default DCB attributes for stream I/O.

DD Statement Categories

UCMD Manager DD statements are organized into the following categories:

Category

DD Statements

Category

DD Statements

Runtime specifications

STEPLIB and UNVNLS.

Remote command standard files (stdin, stdout, and stderr)

UNVIN, UNVOUT, and UNVERR.

UCMD message and command files (stdin, stdout, and stderr)

SYSPRINT, SYSOUT, and UNVTRACE.

Command files

User-defined DD statements to which Universal Command commands refer.

UNVIN Concatenation Requirements

Sequential data sets can be concatenated on the UNVIN ddname. When the UNVIN ddname is open, it is treated as a single data set with the following attributes:

  1. The RECFM of the first data set in the concatenation.

  2. The LRECL of the first data set in the concatenation.

  3. The BLKSIZE of the largest block size in the concatenation.

IBM does not support concatenating data sets with differing RECFM values or LRECL values larger then the first data set in the concatenation. Unpredictable results, including ABENDs, may occur when these rules are not followed.

IBM documents concatenation rules in the IBM C/C++ Programming Guide.

JCL

The following figure illustrates the UCMD Manager for z/OS JCL using the UCMDPRC JCL procedure, above.

 

HTML


Job step STEP1 executes the procedure UCMDPRC with the STDOUT parameter set to a value that allocates a local file.

The command options are specified on the SYSIN DD.

Configuration

Configuration consists of:

  • Setting default options and preferences for all executions of UCMD Manager.

  • Setting options and preferences for a single execution of UCMD Manager.

These configuration options are read from the following sources:

  1. PARM keyword (command line)

  2. SYSIN ddname (command line)

  3. Command file ddname

  4. Configuration file

The order of precedence is the same as the list above; PARM keyword options being the highest and configuration file being the lowest. That is, options specified via a PARM keyword override options specified via a SYSIN ddname, and so on.

For detailed information on these methods of configuration, see Configuration Management.

Configuration File

The configuration file provides the simplest method of specifying default configuration options whose values you do not want changed with each command invocation. These values are used if the options are not read from one or more other sources.

Some options only can be specified in the configuration file; they have no corresponding command line equivalent. Other options cannot be specified in the configuration file; they must be specified via one or more other sources for a single execution of UCMD Manager.

The configuration file is provided to the UCMD Manager by the local Universal Broker with which it registers. The UCMD Manager configuration file is located in the UCMCFG00 member of the PDSE allocated to the UNVCONF ddname in the Universal Broker started task.

Note

For any changes to the UCMD Manager configuration file to become active, a Universal Broker refresh is required, or the Universal Broker started task must be restarted.

Configuration Options

This section describes the configuration options used to execute UCMD Manager for z/OS.

Configuration Options Categories

The following table categorizes the configuration options into logical areas of application. Each Category name is a link to a table of options in that category. Each Option Name in those tables is a link to detailed information about that option.

Category

Description

Certificates

X.509 certificate-related options.

Command

Command or script to execute on the remote system. If a script is being executed, the script may reside on the local host on which the Manager is running or the remote host on which the Server is running.

It also includes options to control the process environment in which the command executes.

Events

Options used to define event generation.

Local

Options required for local Broker registration.

Messages

Universal Command message options.

Miscellaneous

Options used to display command help and program versions.

Network

Processing options for all the data transferred between the remote and local systems.

Options

Alternative methods to specify configuration options.

Remote

Network address of the remote system and connection options.

Spool

Options that control whether or not the Manager spools its standard files and how they are processed.

Standard File

Processing options for the standard files transferred between the remote and local systems.

The STDFILE options are specified differently then the other options. There are three types of standard files: stdin, stdout, and stderr. Each standard file can have a different set of options applied. In order to distinguish between the standard files, the options must start with a standard file specification option (STDERR_SPEC, STDIN_SPEC, or STDOUT_SPEC). The standard file options (names starting with SIO_) follow the standard file specification option.

User

User account that the command executes with on the remote system.

Certificate Category Options

Command Category Options

Events Category Options

Local Category Options

Messages Category Options

Miscellaneous Category Options

Network Category Options

Options Category Options

Remote Category Options

Standard File Category Options

User Category Options

Command Line Syntax

The following figure illustrates the command line syntax — using the command line, long form of the configuration options — of UCMD Manager for z/OS.

 

ucmd { -cmdcommand [-cmd_type {cmdref|shell|stc} ] | -scriptddname [-optionsoptions] [-script_typetype] [-script_line_ignore_maskmask] } [-hosthostlist [-connect_retry_countnumber] [-connect_retry_intervalseconds] [-connect_timeoutseconds] [-dns_expand {yes|no} ] [-host_selection {sequential|random} ] [-mft_safe_mode {yes|no} ] [-fileddname | -encryptedfileddname [-keykey] ] * [-portport] [-system_idID] [-useriduser [-pwdpwd] ] [-hostname_retry_countcount] [-outboundiphost] [-serveroptions] [-uencrypted_codepagecodepage] [-elevate_user_token {yes|no} ] [-assign_process_to_joboption] [-managerft {yes|no} ] [-cmdidid] [-login {yes|no} ] [-langlanguage ] [-level {trace|audit|info|warn|error}[,{time|notime} ] [-msg_suppression_listlist ] [-tracefilelineslines] [-trace_tablesize,{error|always|never} ] [-ssl_implementation {openssl|system} ] [-ca_certsddname [-verify_host_name {yes|no|hostname} ] [-verify_serial_numbernumber] ] [-certddname-private_keyddname [-private_key_pwdpassword] ] [-daysnumber] [-crlddname] [-saf_key_ringname [-saf_key_ring_labellabel] ] [-ctl_ssl_cipher_listcipherlist] [-data_ssl_cipher_listcipherlist] [-default_ciphercipher] [-forcecomplete {yes|no} ] [-job_retentionseconds] [-delayseconds] [-min_ssl_protocoloption] [-networkft {yes|no} ] [-retry_countnumber] [-retry_intervalseconds] [-restart {yes|no|auto} [-managerft {yes|no} [-cmdidid] ] ] [-server_stop_conditionscodes] [-codepagecodepage] [-compress {yes|no}[,{zlib|hasp} ] ] [-encrypt {yes|no} ] [-authenticate {yes|no} ] [-stdin | -stdout | -stderr] [-codepagecodepage] [-compress {yes|no}[,{zlib|hasp} ] ] [-encrypt {yes|no} ] [-authenticate {yes|no} ] [-localfileddname] [-mode {text|binary}[,{ucs|direct} ] [-trailingspaces {yes|no} ] ] [-remotecodepagecodepage] [-exit_code_mapmap] [-commenttext] ucmd { -help | -version }

 

* The command file (-file or -encryptedfile) can contain some or all required and/or optional configuration options, including -cmd (or -script) and -host. If a command file is specified on the command line, and it contains the required -cmd (or -script) and -host options, those options do not have to be specified additionally on the command line.

Shutdown Procedure

When the UCMD Manager and UCMD Server are configured to use the network fault tolerant protocol, the z/OS Manager must be shut down properly in order for the UCMD Server and user command to shut down as well. If not properly shut down, the UCMD Server will wait for a period of time for the UCMD Manager to reestablish network connections.

If the UCMD Manager and UCMD Server are not configured to use the network fault tolerant protocol, the z/OS Manager can be shut down with any available method.

Fault Tolerant Shutdown

The z/OS Manager is a z/OS UNIX System Services (USS) application. A shutdown sequence is initiated by sending a USS termination signal to the job. The UCMD Manager detects the signal and promptly sends a terminate message to the UCMD Server. Upon receiving the terminate message, the UCMD Server starts its shutdown sequence.

A termination signal is sent to a z/OS Manager, as shown in the following steps:

Step 1

For the z/OS Manager job to be shut down, obtain its USS process identifier (PID). The PID of a job is displayed with the DISPLAY OMVS console command:
 

 
(userid is the user identifier with which the batch job executes.)
 
If you do not know the user identifier, all USS work can be displayed with the following command:
 

 
The batch job's name and address space identifier are listed. Find the job name and address space identifier of the job to be terminated and obtain its process identifier from the PID column.

Step 2

Send a termination signal to the process identifier with the MODIFY BPXOINIT command:
 

 
(pid is the process identifier obtained from Step 1.)

Non-Fault Tolerant Shutdown

Since the UCMD Server shutdown sequence is started as soon as a network connection is prematurely closed, the z/OS Manager shutdown can be initiated with any available z/OS job termination method.

The most common and safest method is the CANCEL console command:

(jobname is the name of the z/OS Manager batch job to terminate.)