Remote Execution via Universal Data Mover - Primer

Overview

This page discusses the basics of how to execute remote work using Universal Data Mover via Universal Data Mover (UDM).

Note

Please read Universal Data Mover - Remote Execution prior to reading this page, which builds upon the material presented in the Overview.

The primer discussions are from the perspective of the initiating system where the Universal Command (UCMD) Manager component is executed via the Universal Data Mover (UDM) exec command.

The primer examples assume that Universal Data Mover is installed with default configuration values to help keep the examples consistent and clear. UCMD components must be installed both on the local system from which the UCMD Manager is executed as well as the remote system where UCMD Server is executed.

The primer examples demonstrate how to execute a command on a remote system using the UDMD Manager component via the UDM Manager component using the UDM exec command. All examples use the same set of parameters.

Remote Execution Examples - exec Command Parameters

The following table describes each of the parameters used in the primer examples.

Parameter

Description

cmd

Command to be executed on the remote system.

user

Remote user ID with which to execute the command. The user ID must be a valid user ID on the remote system. The examples use a user ID value of joe. This will need to be changed to a valid user ID on the remote system on which Universal Command Server runs.

pwd

Password for the user ID on the remote system. The examples use an arbitrary value of abcdefg. This will need to be changed to the password for the USER_ID you use to execute the remote command.

Remote Execution Requirements

This page illustrates the minimum set of parameters required to execute a remote process via the Universal Data Mover (UDM) exec command using UDM scripting language syntax.

The platform-independent nature of the UDM scripting language means that the format of exec is the same regardless of the UDM Manager's host platform. See the Universal Data Mover 7.3.x Reference Guide for platform-specific information on executing UDM Manager, using UDM script files, and invoking exec.

exec instructs UDM to spawn a Universal Command (UCMD) Manager process. The Universal Command 7.3.x Reference Guide contains platform-specific information for invoking UCMD Manager. A UCMD Server installed on the remote system receives the command specified by exec's cmd parameter and executes it.

If security is enabled in the remote UCMD Server's configuration, exec must provide user account information. To establish a secure execution environment, the UCMD Server requires a user account ID, which exec specifies via the user parameter. The UCMD Server may also require a password (pwd) to authenticate the user account, depending on the remote operating system and Universal Agent configuration.

For information on securing access to Universal Agent components, see Universal Agent Security.

Executing the Examples

To execute the following examples in your environment, simply make these changes to the values specified in the command's parameters:

  • Change the host name dallas or IP address 192.168.10.111 to a host name or IP address that exists in your environment.
  • Change the cmd parameter to a valid system command or installed application on the remote system.
  • Change the user ID joe to the name of a valid user account on the remote system.
  • Change the password value abcdefg to the user account's password.

In each of these examples, the UCMD Manager establishes a network connection to the UCMD Server installed on the remote system (dallas). The UCMD Manager passes exec parameters to the UCMD Server over this connection. UCMD Server then executes the command as local user named joe.

The UCMD Manager and Server also establish network connections to forward the command's output (that is, everything it writes to standard output and standard error) to the UDM Manager. UDM Manager writes this output to its local standard output (stdout) and standard error (stderr) devices.

When the remote command completes, the UCMD Server retrieves the process' exit code and status and forwards them to the local UCMD Manager, which exits with that same value. The UDM Manager stores this exit code in its built-in _execrc variable.

Remote Execution Requirements for z/OS

These examples illustrate how to execute a process on a remote z/OS system using the UDM exec command. Each example lists the contents of the /u/joe directory in the z/OS UNIX file system.

If no DNS entry is available for the remote host, use a statement like the one shown in #Remote z/OS Execution Using an IP Address; otherwise, use something similar to #Remote z/OS Execution Using a Host Name.

To execute a command on a remote system using an active UDM transfer session, follow the example shown in #Remote z/OS Execution Using a UDM Logical Session Name.

The exec command initiates UCMD Manager using the UCMDPRC JCL procedure installed in the SUNVSAMP library.

Remote z/OS Execution Using an IP Address

exec 192.168.10.111 cmd="ls -al /u/joe" user=joe pwd=abcdefg

Remote z/OS Execution Using a Host Name

exec dallas cmd="ls -al /u/joe " user=joe pwd=abcdefg

Remote z/OS Execution Using a UDM Logical Session Name

open rmtsys=dallas user=joe pwd= abcdefg

exec rmtsys cmd="ls -al /u/joe "

Remote Execution Requirements for Windows

These examples illustrate how to execute a process on a remote Windows system using the UDM exec command. Each example lists the contents of the root directory on the c: drive.

If no DNS entry is available for the remote host, use a statement similar to the one shown in #Remote Windows Execution Using an IP Address; otherwise, use something similar to #Remote Windows Execution Using a Host Name.

To execute a command on a remote system using an active UDM transfer session, follow the example shown in #Remote Windows Execution Using a UDM Logical Session Name.

Remote Windows Execution Using an IP Address

exec 192.168.10.111 cmd="dir c:\" user=joe pwd=abcdefg

Remote Windows Execution Using a Host Name

exec dallas cmd="dir c:\" user=joe pwd=abcdefg

Remote Windows Execution Using a UDM Logical Session Name

open rmtsys=dallas user=joe pwd= abcdefg
exec rmtsys cmd="dir c:\"

Remote Execution Requirements for UNIX

These examples illustrate how to execute a process on a remote UNIX system using the UDM exec command. Each example lists the contents of the home directory for the user account named joe.

If no DNS entry is available for the remote host, use a statement like the one shown in #Remote UNIX Execution Using an IP Address; otherwise, use something similar to #Remote UNIX Execution Using a Host Name.

To execute a command on a remote system using an active UDM transfer session, follow the example shown in #Remote UNIX Execution Using a UDM Logical Session Name.

Remote UNIX Execution Using an IP Address

exec 192.168.10.111 cmd="ls -al /home/joe" user=joe pwd=abcdefg

Remote UNIX Execution Using a Host Name

exec dallas cmd="ls -al /home/joe" user=joe pwd=abcdefg

Remote UNIX Execution Using a UDM Logical Session Name

open rmtsys=dallas user=joe pwd= abcdefg
exec rmtsys cmd="ls -al /home/joe"

Remote Execution Requirements for IBM i

These examples illustrate how to execute a process on a remote IBM i system using the UDM exec command. Each example lists the contents of the library joelib.

If no DNS entry is available for the remote host, use a statement like the one shown in #Remote IBM i Execution Using an IP Address; otherwise, use something similar to #Remote IBM i Execution Using a Host Name.

To execute a command on a remote system using an active UDM transfer session, follow the example shown in #Remote IBM i Execution Using a UDM Logical Session Name.

The exec command initiates UCMD Manager via runtime linkage on IBM i. Stonebranch only supports runtime linkage to the UCMD Manager using the exec command.

The operating system sends the output for the remote IBM i job to QPRINT. Use the Universal Submit Job utility (USBMJOB) to bring the output back to the local host via the UCMD Manager.

Remote IBM i Execution Using an IP Address

exec 192.168.10.111 cmd="dsplib joelib" user=joe pwd=abcdefg

Remote IBM i Execution Using a Host Name

exec dallas cmd="dsplib joelib" user=joe pwd=abcdefg

Remote IBM i Execution Using a UDM Logical Session Name

open rmtsys=dallas user=joe pwd= abcdefg
exec rmtsys cmd=" dsplib joelib"