Universal Command Server for zOS - Commands

Universal Command Server for zOS - Commands

Overview

There are three types of work that a z/OS Universal Command Server can execute:

  1. z/OS USS commands and scripts

  2. Started Tasks

  3. Command References

In all cases, the work executes in its own address space with its own user identity. No Universal Agent programs share the address space with the unit of work started by the Server.

z/OS UNIX System Services Command

The UCMD Server's default command type is the z/OS USS shell. This can be customized with the COMMAND_TYPE configuration option. USS shell commands are executed in a USS process within its own address space.

A UCMD Manager requests the execution of a USS command by specifying a COMMAND_TYPE of shell. USS scripts are requested by specifying a SCRIPT_TYPE of shell.

The environmental attributes of the user process are described in the following sections.

User Identification

UCMD Server can operate with user security active or inactive, based on the USER_SECURITY configuration option.

  • With user security active, the UCMD Server requires the UCMD Manager to supply a valid z/OS user ID and a password. The user process executes with the user ID and the primary and secondary group IDs of the user. The user profile must have a properly defined OMVS segment.

  • With user security inactive, the Server does not require the Manager to supply a valid user ID. The user process executes with the user ID of the Server. The Server inherits its user ID from the Broker started task, which is a superuser account (UID 0). The superuser account provides a lot of access to the operating system that a user process typically does not require. Setting security inactive is not recommended because of the level of access it permits the user process.

Working Directory

The working directory of a user process depends on whether user security is active or inactive:

  • With user security active, a user process's working directory is the home directory of the user ID as defined in the user profile's OMVS segment HOME parameter value.

  • With user security inactive, a user process's working directory is the working directory as defined by the Universal Broker's user profile OMVS segment HOME parameter value. All user processes executed will use the same directory. Care should be taken to avoid name clashes and other consequences of multiple processes sharing a working directory.

Command Shell

The UCMD Manager LOGIN option and the UCMD Server LOGIN option determine what command shell is used.

For non-login environments, the default is shell /bin/sh. The shell used for non-login environments is configurable with the SHELL option.

For login environments, the shell defined in the user ID's OMVS segment with the SHELL option is used. The shell environment is created as if the user logged on interactively. For example, the shell's .profile is used to initialize the environment.

The non-login environment is similar to the environment that the cron scheduler provides. User resource files, such as .profile, are not utilized.

The application scripts being executed and your local system management policies should be used to determine which method is best.

If user security is inactive, the default shell /bin/sh always is used independent of the SHELL option.

Environment Variables

Environment variables are inherited from the Universal Command Server, which in turn inherits them from the Universal Broker. If security is active, certain variables are modified to match the user environment: HOME, LOGNAME, USER, PWD, and SHELL. Their values are updated to reflect the values for the new environment.

The following variables are added if not found in the environment: HOME, USER, SHELL, and UCMDENV. The UCMDENV variable is set to a value of 1. It can be used within scripts to determine if Universal Command has invoked them.

The UCMD Manager LOGIN option and the UCMD Server LOGIN option have an impact on the environment variables defined. For login environments, the user's shell is invoked as a login shell, which, in turn, uses the shell profile file in the user's home directory. So any environment variables set in the profile file also will be defined.

If user security is inactive, no changes are made to the environment variables.

Started Tasks

The Universal Command Server has the ability to execute z/OS started tasks. Started tasks have some advantages over USS commands. They execute z/OS programs using standard JCL. The JCL must be predefined in a system procedure library.

UCMD Managers refer to the started task by name and optionally provide an input file and JCL overrides. A Manager requests the execution of a started task by specifying a COMMAND_TYPE of stc.

Started task requests are processed by the Universal Command Server Command Processor for Started Tasks (UCMSCPST). The Command Processor (CP) is executed by the Server as a USS process within its own address space.

The STC CP execution environment is the same as the USS command environment described in z/OS UNIX System Services Command.

Extended MCS Console

The started task is started with the START system command through an extended MCS console. Refer to the IBM MVS System Commands manual for a complete description of the START command.

The extended MCS console is established with the following attributes:
 

Extended MCS Attribute

Value

Command Authority

System commands (SYS)

Console Key (used in DISPLAY C command)

STNBRNCH

Console Name

UNVSnnnn, where nnnn is 0000 - 9999.

Command Scope

Current system

Message Scope

Current system

Override User Profile OPERPARM

Yes

 

Extended MCS consoles can be protected so that only permitted users have the authority to issue commands. The RACF OPERCMDS class is used to establish user security for extended MCS consoles.

Refer to the IBM MVS Planning: Operations and the Security Server RACF Security Administrator Guide manuals for complete details.

START System Command

The UCMD Manager provides the START command parameters. The STC CP adds parameter STDIN with a value of a cataloged dynamically allocated data set that contains the standard input from the Manager.

The syntax of the START command that is generated based on options passed to UCMD is as follows:

HTML

The manager-cmd value is the command value provided by the UCMD Manager. The stdin-dataset value is the dynamically allocated data set that contains the Manager's standard input data.


As an example, the following Manager command, executed from a Windows system:

HTML