Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Macro name changed from html to html-bobswift during server to cloud migration processing.
Panel
Table of Contents
maxlevel2

...

The following command line syntax is used for issuing the CLI command, uagcmd:
 

Panel
Html bobswift
<pre>
uagcmd <i>function</i> <i>Global parameters</i> <i>function-specific parameter(s)</i>
</pre>

Command Line Entry

Description

uagcmd

CLI command that executes all CLI functions.

function

CLI function that performs a specific action in a Universal Controller.

Global parameters

CLI parameters (required and optional) available for all functions.

function-specific parameter(s)

CLI parameters (required and optional) specific to one or more functions.

For example:
 

Panel
html-bobswift
<pre>
uagcmd ops-task-launch 

-c config.cfg

...

Html bobswift
 -x encryptedfile.txt task-type=unix task-name=task01
</pre>

In this example, the required Global Parameters are contained in the config.cfg configuration file.
 

Note
titleNote

For backward-compatibility, you can exclude uagcmd from the command line for all pre-6.2.0.0 CLI functions.

...

UNIX

The CLI functions are installed in the following directory:

Html bobswift
<ul>
<li> <code>/CLI_HOME/bin</code>
</ul>

Replace CLI_HOME with the directory in which the Agent components are installed.

Windows

The CLI functions are installed in the following directory:

Note
titleNote

Do not use fully qualified file names (that is, with the .exe extension) in CLI for Windows parameters; an error will occur.

z/OS

The CLI is implemented with a single program, UAGCMDZ. UAGCMDZ (with alias OPSCMDZ) is installed in the SUNVLOAD library as part of the Universal Agent for z/OS Installation package.
 
See Using the CLI for z/OS for detailed information on using the CLI in a z/OS environment.

Html bobswift
<ul>
<li> <code>DRIVE:\CLI_HOME\bin</code>
</ul>
Replace:
<ul>
<li> <code>DRIVE</code> with the drive they are installed on. Add the appropriate directory for your O/S to your PATH environment variable in order to execute the functions without specifying their full path name.
<li> <code>CLI_HOME</code> with the directory in which the Agent components are installed.
</ul>
Note
titleNote

Do not use fully qualified file names (that is, with the .exe extension) in CLI for Windows parameters; an error will occur.

z/OS

The CLI is implemented with a single program, UAGCMDZ. UAGCMDZ (with alias OPSCMDZ) is installed in the SUNVLOAD library as part of the Universal Agent for z/OS Installation package.
 
See Using the CLI for z/OS for detailed information on using the CLI in a z/OS environment.

Anchor
CLI Login
CLI Login
CLI Login

...

If either restriction is in place, the following error message will display when you issue a CLI command:

Panel
Html bobswift
<pre>
User &lt;your user name&gt; not permitted to use the command line interface. Please check with your administrator.
</pre>

To remove the restriction, the system administrator must either:

...

Anchor
OMS Servers
OMS Servers
OMS Servers

Description

Description

Password

Specifies one or more OMS server addresses used for network communication.
 
The syntax of the value is PORT@HOST[,PORT@HOST...], where:

port

If multiple OMS servers are specified, they must be comma-separated.

PlatformsAll

Configuration File Entry

network.omsservers=

Command Line Switch

-m

Environment Variable

OMSSERVERS

Required

Yes

Default

Example

network.omsservers=7878@dallas01.acme.com,7878@dallas02.acme.com

...

Html bobswift
<ul>
<li> PORT is the TCP 

port

Html bobswift
 on which the OMS server is listening. The OMS default port is 7878.
<li> HOST is the host name or IP address of the OMS server.
</ul>

If multiple OMS servers are specified, they must be comma-separated.

PlatformsAll

Configuration File Entry

network.omsservers=

Command Line Switch

-m

Environment Variable

OMSSERVERS

Required

Yes

Default


Example

network.omsservers=7878@dallas01.acme.com,7878@dallas02.acme.com

Anchor
Password
Password
Password

Description

Password that the CLI will use to log into the Controller. Must be a valid password for this user.

PlatformsAll

Configuration File Entry

security.password=

Command Line Switch

-p

Environment Variable

n/a

Required

Yes

Default

(none)

Example

o

...

The functions and syntax requirements for the z/OS environment are very similar to the other supported platforms with a few exceptions described below.

Note

IBM’s z/OS Language Environment (LE) interprets the first forward slash (/) in a parameter string as a separator between parameters meant for LE and parameters meant for the program being executed. To avoid confusion, parameters which contain a forward slash should be enclosed in double quotes. For instance agent-type=z/OS should be agent-type=”z/OS”.


Command Line Options

When UAGCMDZ is executed as a batch program, command line parameters are specified with the step PARM keyword.

For example:

Panel

...

Html bobswift
<pre>
 //STEP01   EXEC PGM=UAGCMDZ,
 //  PARM='ops-agent-status -c dd:CMDOPTS agent-type=windows'
</pre>

Syntax for Options That Accept File Names: -a, -c, -e, and -x

If you use the -a, -c, -e, and -x command line switches for specifying a file on the command line, you must use one of the following formats for the file name.

...

The following example illustrates running UAGCMDZ as a batch job to request the status of all Windows Agents.

Panel

In this example:

The step PARM value specifies the CLI function and its options.

The job step can include only one function.

The STEPLIB points to the z/OS Agent load library.

The output will be in SYSPRINT.

CMDOPTS is a DDNAME that references the location of the function parameters.

...

You can also issue CLI functions under a TSO session.

The sample command string below shows a CLI function issued from an ISPF Command Shell prompt:

...

This function will return data similar to the sample below:

...

The following two examples show how to issue a CLI function in a batch TSO.

Example One

...

Output will be in SYSTSPRT.

Example Two

...

The following REXX EXEC must be located in USER.REXX(OUTTRAP1):

panel
Html bobswift
<pre>
 //jobname  JOB (acctg-info),'your name',MSGCLASS=X,MSGLEVEL=(1,1),
 //             CLASS=A,NOTIFY=&SYSUID
 //*
 //STEP01   EXEC PGM=UAGCMDZ,
 // PARM='ops-agent-status -c dd:CMDOPTS agent-type=windows'
 //STEPLIB  DD DISP=SHR,DSN=UNV.SUNVLOAD
 //SYSPRINT DD SYSOUT=*
 //SYSOUT   DD SYSOUT=*
 //CMDOPTS  DD DSN=USER.PARM(CMDOPTS),DISP=SHR
 //CEEDUMP  DD SYSOUT=*
</pre>

In this example:

The step PARM value specifies the CLI function and its options.

The job step can include only one function.

The STEPLIB points to the z/OS Agent load library.

The output will be in SYSPRINT.

CMDOPTS is a DDNAME that references the location of the function parameters.

Anchor
Issuing CLI Functions under TSO
Issuing CLI Functions under TSO
Issuing CLI Functions under TSO

You can also issue CLI functions under a TSO session.

The sample command string below shows a CLI function issued from an ISPF Command Shell prompt:

Panel
Html bobswift
<pre>
 Enter TSO or Workstation functions below:
 ===> uagcmdz ops-agent-status -c "//'USER.PARM(CMDOPTS)'" agent-type=windows
</pre>

This function will return data similar to the sample below:

Panel
Html bobswift
<pre>
 Agentname                       AgentType     Status
 agent-sys00101                  Windows       Active
 agent-sys00201                  Windows       Offline
 opscmd-complete
</pre>

Anchor
Issuing CLI Functions as a Batch TSO
Issuing CLI Functions as a Batch TSO
Issuing CLI Functions as a Batch TSO

The following two examples show how to issue a CLI function in a batch TSO.

Example One

Panel
Html bobswift
<pre>
 //CMDZBAT  JOB (acctg-info),'your name',MSGCLASS=X,MSGLEVEL=(1,1),
 //             CLASS=A,NOTIFY=&SYSUID,TIME=5
 //*
 //STEP01   EXEC PGM=IKJEFT01,DYNAMNBR=200,REGION=40M
 //STEPLIB  DD DISP=SHR,DSN=UNV.SUNVLOAD
 //SYSPRINT DD SYSOUT=*
 //SYSOUT   DD SYSOUT=*
 //SYSTSPRT DD SYSOUT=*
 //CMDOPTS  DD DSN=USER.PARM(CMDOPTS),DISP=SHR
 //SYSTSIN DD *
 uagcmdz ops-agent-status -c dd:CMDOPTS agent-type=windows
 /*
</pre>

Output will be in SYSTSPRT.

Example Two

Panel
Html bobswift
<pre>
 //REXXAGNT JOB (acctg-info),'your name',MSGCLASS=X,MSGLEVEL=(1,1),
 //             CLASS=A,NOTIFY=&SYSUID,TIME=5
 //*
 //STEP01   EXEC PGM=IKJEFT01,DYNAMNBR=200,REGION=40M
 //STEPLIB  DD DISP=SHR,DSN=UNV.SUNVLOAD
 //SYSEXEC  DD DSN=USER.REXX,DISP=SHR
 //SYSPRINT DD SYSOUT=*
 //SYSTSPRT DD SYSOUT=*
 //CMDOPTS  DD DSN=USER.PARM(CMDOPTS),DISP=SHR
 //SYSTSIN DD *
   %OUTTRAP1
 /*
</pre>

The following REXX EXEC must be located in USER.REXX(OUTTRAP1):

Panel
Html bobswift
<pre>
 /**************************** REXX *********************************/
 /* Using OUTTRAP to                                                */
 /*         (1) Obtain z/OS agent status                            */
 /*         (2) Test status from the response               */
 /*         (3) Launch a task if the agent status is Active         */
 /*******************************************************************/
 x = OUTTRAP('OPS.')
 uagcmdz "ops-agent-status -c dd:CMDOPTS agent-type=""z/OS"""
 SAY 'RC is:' RC
 SAY OPS.0 'records were read.'
 launch = 'NO'
 DO i = 1 to OPS.0 WHILE launch = 'NO'
  IF SUBSTR(OPS.i,61,6) = 'Active' THEN
   DO
    launch = 'YES'
    uagcmdz "ops-task-launch -c dd:CMDOPTS task-name=DUMPT"
   END
 END
 DO i = 1 to OPS.0
   SAY OPS.i
 END
 y = OUTTRAP('OFF')
</pre>