IBM Support

Using a concatenation character in a "Take Action" command for the WAS agent.

Technote (FAQ)


Is it possible to use a concatenation character in a "Take Action" command for the WAS agent?


If you are trying to build a multi-character command where the variable/attribute name is right next to a command (see screenshot example below) then this will not work as of ITM 6.2.3.

If the panel is being blocked in the view above, the command reads:
su - Application_Server_Status.WAS_Node_Name -c "Application_Server_Status.WAS_Configuration_Repository_Directory_Name"/bin/ Application_Server_Status.Server_Name

There is no valid concatenation character in this instance that combines the above Configuration_Repository_Directory_Name variable substitution with "/bin/" in the above example. You will have to separate out the commands or use an external script.

You might have to use a multi-segment command as follows:

su - &Application_Server_Status.WAS_Node_Name -c cd &Application_Server_Status.WAS_Configuration_Repository_Directory_Name ;
./bin/ &Application_Server_Status.Server_Name

In Linux/Unix, a semicolon can be used to delimit a sequence of commands. This is two commands, the first changes the current directory and the second runs the command.. The semicolon might need to be escaped with a backslash.

Or maybe

su - &Application_Server_Status.WAS_Node_Name -c cd &Application_Server_Status.WAS_Configuration_Repository_Directory_Name
&& ./bin/ &Application_Server_Status.Server_Name

which is a conditional sequence. The first command is

cd &Application_Server_Status.WAS_Configuration_Repository_Directory_Name

which sets the current directory. If that returns an exit code zero the next command in the sequence runs.

./bin/ &Application_Server_Status.Server_Name

You might need to escape those && . like \&\& or maybe even \&\&\&\& or "&&" or '&&' to get what you want.

Figure out what input character sequence will survive the ITM Action command substitution and then the Linux/Unix/Win command line
substitutions and special character usage.

Cross reference information
Segment Product Component Platform Version Edition
Systems and Asset Management Tivoli Composite Application Manager for Web Resources ITCAM for Web Resources (WAS TEMA)

Document information

More support for: Tivoli Composite Application Manager for Application Diagnostics

Software version: 7.1

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Reference #: 1576066

Modified date: 17 November 2014