Important This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 22.3.01 for BMC Helix Operations Management.

Local Variables


Local variables are private for each PSL process and are initialized at the start of the process. The types of local variables are:

  • Named - A name is assigned to the variable by the programmer.
  • Unnamed - A name is not provided, and the PATROL Agent assigns one.

Named Variables

In a named variable, the PATROL Agent creates a variable author and assigns it the value John Doe. The agent then executes the function nthargf(author,1) and assigns the result to a second variable named firstname. The result is that two named local variables are created. Below is an example: 

author="John Doe"; firstname=nthargf(author,1);

Unnamed Variables

In an unnamed variable, the PATROL Agent automatically assigns a name because the programmer does not provide a name. Below is an example: 

firstline =nthline(cat(my le),1); 

In this example, because a name was not provided for the subfunction cat(error file), PATROL assigns it a name. The former example expands to the following: 

unnamed var=cat(myfile); firstline =nthline(unnamed var,1); 

This means that the output of every command is stored inside a variable (named or unnamed).

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*