USER_SCRIPT - UEM Manager configuration option

Description

The USER_SCRIPT option specifies the location of one or more system commands that are executed as a script file by the UEM Server whenever an event occurrence, or the event itself, enters one of the states specified by the EVENT_STATE option.

The system commands (that is, script statements) are read from:

  • DD statement referenced by ddname (z/OS)
  • Local file specified by filename (Windows and UNIX)

The statements are sent to the demand-driven UEM Server and stored in a temporary script file. It is this script file that is executed by UEM on behalf of the event handler.


A Stonebranch Tip

To execute a script that resides on the remote system where an event is being monitored by a demand-driven UEM Server, use the USER_COMMAND option and give the script file as the value for command.


The script's contents can include any statement that is valid for the system on which they will execute (that is, the system identified by the REMOTE_HOST option). The maximum size of a script file is approximately 64,000 characters.

USER_SCRIPT cannot be used with the HANDLER_ID or USER_COMMAND options for a specified EVENT_STATE.

Examples


UNIX and Windows

The following example is invalid:
 
-triggered -script c:\myscript.txt -handler_id id001
 
In this example, it is unclear whether the contents of the script contained in the local file c:\myscript.txt or the actions contained in the stored event handler id001 should be executed whenever an event occurrence is set to a triggered state.
 
The following example is valid:
 
-triggered -handler_id id001 -expired -script c:\myscript.txt
 
In this example, the -handler_id and -script options are specified for different event states.

  • If an event occurrence is set to a triggered state, the demand-driven UEM Server will execute the actions specified in the stored event handler id001.
  • If the monitored event is set to an expired state, the UEM Server will execute the contents of the script contained in the file c:\myscript.txt.

z/OS

The following example is invalid:
 
-triggered -script myscript -handler_id id001
 
In this example, it is unclear whether the contents of the script contained in the data set referenced by the DD name myscript, or the actions contained in the stored event handler id001, should be executed whenever an event occurrence is set to a triggered state.
 
The following example is valid:
 
-triggered -handler_id id001 -expired -script myscript
 
In this example, the -handler_id and -script options are specified for different event states.

  • If an event occurrence is set to a triggered state, the UEM Server will execute the actions specified in the stored event handler id001.
  • If the monitored event is set to an expired state, the UEM Server will execute the contents of the script referenced by the DD statement myscript.

Usage

Method

Syntax

IBM i

HP NonStop

UNIX

Windows

z/OS

Command Line, Short Form

n/a






Command Line, Long Form

-script ddname or filename



(tick)

(tick)

(tick)

Environment Variable

n/a






Configuration File Keyword

n/a






Value

ddname (for z/OS) and filename (for Windows and UNIX) is the location of the commands to be executed as a script file.