All variables are prefixed by %%. In addition to the %% prefix, certain characters can be added to determine special characteristics. These special prefixes are described in the following table.
Variable Prefix |
Description |
---|---|
%%\ |
Indicates that a variable is global for the Control-M/Server (Control‑M/Server and all its connected agents). This prefix is used only when creating or modifying the variable. When the variable is referenced (for example, in a Notification message) it is referenced without the \. For more information about global variables, see the Scope section below. |
%%# %%%#% |
Indicates that the variable should not be resolved. This prefix enables inclusion of a variable name as text in job output. The # symbol is stripped from the output, and the remaining variable name is included as text in the appropriate location. For example, a Notification message of is output as: Job Daily returned a value for variable %%PARM1 |
%%@ |
Indicates that the variable should contain a value to be resolved by each job that uses it. For example: %%\PARM1 = %%@TIME Indicates that whenever a job uses Global variable %%PARM1, it should be resolved to the execution time of the job (that is, the time at which the variable is referenced). If the above parameter is specified without the @ sign (%%\PARM1 = %%TIME), it always resolves to the execution time of the job that set the variable (that is, the time at which the variable was created). NOTE: This prefix is relevant only for Global variables whose values contain variables. NOTE: If the value %%@ (value) is defined via a job in a POOL variable, the value is not resolved in the pool. |
%%\\ |
Indicates that the variable belongs to a SMART folder. You can update or add variables from the jobs that are included in the SMART folder. The jobs contained in the SMART folder inherit the variable definition of the SMART folder. When the variable is referenced (for example, in a Notification message) it is referenced without the \\. For more information about global variables, see the Scope section below. |
%%\\<pool name>\<variable name> |
Indicates that the variable belongs to a container of variables that can be referenced by any active job, by the pool name. EXAMPLE: %%\\pool\COUNT |
%% |
For Windows agents: When specifying variables in the CMDLINE or COMMAND parameters on Control-M/Agent for Windows, the Variable prefix must be specified as %%. |
NOTE: If you use an agent utility (such as ctmcreate) in a batch file to specify an variable, ensure that the prefix is %%%%. |
For examples, see Variable prefixes examples.
Parent Topic |