Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel
Table of Contents

Overview

This page discusses the basics of how to execute remote work using Universal Agent.

Prior to reading this page, read the Overview of Remote execution, as this page 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.

The primer examples assume the Universal Agent product is installed with default configuration values to help keep the examples consistent and clear. Universal Agent 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 Universal Command Manager component. All examples use the same set of configuration options (identified in the table below). The actual option names can be different, depending on the operating system on which the UCMD Manager executes. This difference is due to operating system conventions or standards that UCMD abides by.

Remote Execution Primer Examples

The following table describes each of the Universal Command Manager configuration options used in the primer examples illustrated on this page.
 

Configuration Option Name

Command Line Entry

Description

COMMAND

-cmd

Command to be executed on the remote system.
 
The command used in the examples is the Windows DOS command 'dir \'. If the remote system is a UNIX system, change the command value to "ls /". If the remote system is an IBM i system, change the command to "DSPLIB QGPL".

REMOTE_HOST

-host

Host name or IP address of the remote system on which the command is to be executed.
 
The examples use a host name of dallas. To execute the examples in your environment, change the host name from dallas to the host name of the remote system on which the command is to be executed.

USER_ID

-userid

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 change to a valid user ID on the remote system identified by the REMOTE_HOST option.

USER_PASSWORD

-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.

Executing Universal Command Manager on z/OS

Anchor
1133374
1133374
Universal Command Manager is run as a batch job step on z/OS.

Anchor
1133375
1133375
A UCMD Manager JCL procedure is provided with the Universal Agent installation to simplify JCL requirements. The JCL procedure name is UCMDPRC; it is located in the SUNVSAMP product library. See the Universal Command 7.3.x Reference Guide for more information on the UCMDPRC procedure.

The following figure illustrates the JCL to execute UCMD Manager in a step. The input options are specified on the SYSIN ddname.


Panel
//S1 EXEC UCMDPRC
//SYSIN DD *
-cmd 'dir \' -host dallas -userid joe -pwd abcdefg
/*


Anchor
1133407
1133407
You will need to make the following changes to this example so that it will run in your environment:

  • Change the host name dallas specified with the -host option to the host name of the remote system on which to execute the command.
  • Change the user ID joe to a valid user ID on the remote system.
  • Change the password value abcdefg to the password for the user ID.

Anchor
1133411
1133411
When UCMD Manager is executed, it will establish network connections with UCMD Server on the remote system named dallas, and provide the specified options to the UCMD Server. UCMD Server will execute the specified command 'dir \' as user identifier joe.

Anchor
1133412
1133412
The standard output of the remote command is written to the UCMD Manager UNVOUT ddname allocated in the UCMDPRC procedure. The standard error of the remote command is written to the UCMD Manager UNVERR ddname allocated in the UCMDPRC procedure. The default allocation for both UNVOUT and UNVERR is to SYSOUT. Similarly, standard input is allocated to the UNVIN ddname in the UCMDPRC. UNVIN is not utilized by the remote command being executed in this example.

Anchor
1133413
1133413
The UCMD Manager will execute until the remote command completes and the UCMD Server sends the exit conditions of the remote command back to the UCMD Manager. The UCMD Manager will then end with the same exit code as the remote command.

Anchor
1133414
1133414
Components

Anchor
1133418
1133418
Universal Command Manager for z/OS

Executing Universal Command Manager on Windows

Anchor
1133435
1133435
Universal Command Manager is run as a command on Windows.

The following command and command line options execute UCMD Manager.


Panel
ucmd -cmd 'dir \' -host dallas -userid joe -pwd password


Anchor
1133458
1133458
You will need to make the following changes to this example so that it will run in your environment:

  • Change the host name dallas specified with the -host option to the host name of the remote system on which to execute the command.
  • Change the user ID joe to a valid user ID on the remote system.
  • Change the password value abcdefg to the password for the user ID.

Anchor
1133462
1133462
When UCMD Manager is executed, it will establish network connections with UCMD Server on the remote system named dallas, and provide the specified options to the UCMD Server. UCMD Server will execute the specified command 'dir \' as user identifier joe.

Anchor
1133463
1133463
The standard output of the remote command is written to the standard output of UCMD Manager, which is allocated to the console window. The standard error of the remote command is written to the standard error of the UCMD Manager, which is allocated to the console window. Similarly, standard input of the remote command is read from the standard input of the UCMD Manager, which is allocated to the console windows. Standard input is not utilized by the remote command being executed in this example.

Anchor
1133464
1133464
The UCMD Manager will execute until the remote command completes and the UCMD Server sends the exit conditions of the remote command back to the UCMD Manager. The UCMD Manager will then end with the same exit code as the remote command.

Anchor
1133465
1133465
Components

Anchor
1087998
1087998
Universal Command Manager for Windows

Executing Universal Command Manager on UNIX

Anchor
1133487
1133487
Universal Command Manager is run as a shell command on UNIX.

The following command and command line options execute UCMD Manager.


Panel
ucmd -cmd 'dir \' -host dallas -userid joe -pwd password


Anchor
1133510
1133510
You will need to make the following changes to this example so that it will run in your environment:

  • Change the host name dallas specified with the -host option to the host name of the remote system on which to execute the command.
  • Change the user ID joe to a valid user ID on the remote system.
  • Change the password value abcdefg to the password for the user ID.

Anchor
1133514
1133514
The ucmd program is installed by default in directory /opt/universal/bin. This directory should be added to your PATH environment variable so that the shell can find the ucmd program. Alternatively, you can specify the full path name, /opt/universal/bin/ucmd.

Anchor
1133515
1133515
When UCMD Manager is executed, it will establish network connections with UCMD Server on the remote system named dallas, and provide the specified options to the UCMD Server. UCMD Server will execute the specified command 'dir \' as user identifier joe.

Anchor
1133516
1133516
The standard output of the remote command is written to the standard output of UCMD Manager, which is allocated to the terminal. The standard error of the remote command is written to the standard error of the UCMD Manager, which is allocated to the terminal. Similarly, standard input of the remote command is read from the standard input of the UCMD Manager, which is allocated to the terminal. Standard input is not utilized by the remote command being executed in this example.

Anchor
1133517
1133517
The UCMD Manager will execute until the remote command completes and the UCMD Server sends the exit conditions of the remote command back to the UCMD Manager. The UCMD Manager will then end with the same exit code as the remote command.

Anchor
1133518
1133518
Components

Anchor
1133522
1133522
Universal Command Manager for UNIX

Executing Universal Command Manager on IBM i

Anchor
1133541
1133541
Universal Command Manager is run as a CL command on IBM i.

The following CL command and parameters execute UCMD Manager.


Panel
STRUCM CMD('dir \') HOST(dallas) USERID(joe) PWD(abcdefg)


Anchor
1133564
1133564
You will need to make the following changes to this example so that it will run in your environment:

  • Change the host name dallas specified with the HOST option to the host name of the remote system on which to execute the command.
  • Change the user ID joe to a valid user ID on the remote system.
  • Change the password value abcdefg to the password for the user ID.

Anchor
1133568
1133568
When UCMD Manager is executed, it will establish network connections with UCMD Server on the remote system named dallas, and provide the specified options to the UCMD Server. UCMD Server will execute the specified command 'dir \' as user identifier joe.

Anchor
1133569
1133569
The standard output and standard error of the remote command are written to the standard output and standard error, respectively, of UCMD Manager, which is allocated to the user's terminal for interactive sessions and to the printer file QPRINT for non-interactive jobs. Similarly, standard input of the remote command is read from the standard input of the UCMD Manager, which is allocated to the user's terminal for interactive sessions and to the QINLINE file for non-interactive jobs. Standard input is not utilized by the remote command being executed in this example.

Anchor
1133570
1133570
The UCMD Manager will execute until the remote command completes and the UCMD Server sends the exit conditions of the remote command back to the UCMD Manager. The UCMD Manager will then end with an escape message if the exit condition was other than success.

Anchor
1133571
1133571
Components

Anchor
1133575
1133575
Universal Command Manager for IBM i

Executing Universal Command Manager on HP NonStop

Anchor
1133593
1133593
Universal Command Manager is run as a TACL command.

The following command and command line options execute UCMD Manager.


Panel
run $SYSTEM.UNVBIN.ucmd -cmd 'dir \' -host dallas -userid joe -pwd password


Anchor
1133616
1133616
You will need to make the following changes to this example so that it will run in your environment:

  • Change the host name dallas specified with the -host option to the host name of the remote system on which to execute the command.
  • Change the user ID joe to a valid user ID on the remote system.
  • Change the password value abcdefg to the password for the user ID.

Anchor
1133620
1133620
When UCMD Manager is executed, it will establish network connections with UCMD Server on the remote system named dallas, and provide the specified options to the UCMD Server. UCMD Server will execute the specified command 'dir \' as user identifier joe.

Anchor
1133621
1133621
The standard output of the remote command is written to the standard output of UCMD Manager, which is allocated to the terminal. The standard error of the remote command is written to the standard error of the UCMD Manager, which is allocated to the terminal. Similarly, standard input of the remote command is read from the standard input of the UCMD Manager, which is allocated to the terminal. Standard input is not utilized by the remote command being executed in this example.

Anchor
1133622
1133622
The UCMD Manager will execute until the remote command completes and the UCMD Server sends the exit conditions of the remote command back to the UCMD Manager. The UCMD Manager will then end with the same exit code as the remote command.

Anchor
1133623
1133623
Components

Anchor
1133627
1133627
/wiki/spaces/DEV/pages/1311670