A user-defined variable is created when it is assigned a value using the Variable Assignment parameter or the Do Variable parameter.
There are four types of variables to choose from when adding a variable to your job definition, either when defining a variable assignment or when you set a variable in an on do action:
If Named Pool is selected, the Pool Name field appears. In the Pool Name field, type the name of the pool.
You can use a local variable as a pool name which enables you to pass a pre-defined pool name to jobs at order time.
EXAMPLE:
Variables added to a job:
Type: Local Variable Name: localvar Value: val
Type: Named Pool Variable Name: namepool Pool Name: %%localvar Value: namval
After you order the job, the named pool variable resolves the localvar variable as the pool name of the named pool variable.
NOTE: The SMART folder option in the Variable Type drop-down list appears when the job is included in the SMART folder.
User variables can also be defined for all jobs in a SMART Folder in the folder properties pane. For more information about assigning a value to a variable, see Variable Expressions.
NOTE: You can view all Global and Named Pool variables in Control-M/EM in the Tools domain by selecting Shared Variables. For more information, see Shared variables.
User-defined variables can be used to
NOTE: Global variables can be used to pass information between jobs in a Control-M/Server. For example, job A can set global variable %%A to Yes, and job B on another agent in the same Control-M/Server can reset %%A to No in response. Global variables can also be created and modified using the ctmvar utility.
Resolution of each user variable depends on the specified prefix, and the scope of the specified variable. Each of these concepts is described below.
Syntax
Valid names for user variables are any alphanumeric string (up to 38 characters in length) preceded by a prefix of %%. Blanks are not allowed in a user variable name.
The following characters cannot be included as part of the name of a User-defined variable: < > [ ] { } ( ) = ; ` ~ | : ? . + - * / & ^ # @ ! , " '.
NOTE: Application-specific job parameters may not be specified in variable values. The names of application-specific job parameters are prefixed by two percent signs, the application’s abbreviation and a hyphen (%%SAPR3- for SAP, %%OAP- for Oracle, and so on).
Names and values for User variables are case sensitive. For example, %%TEST and %%Test are regarded as two separate variables.
NOTE: Names of variables in Control‑M for z/OS must always be in uppercase.
Parent Topic |