Review the following:
You can use variables in Server Management to save time by more easily managing varying path information. For example, to globally control changes to the same location on all servers, you can use a variable for all volumes or drives in the script:
Using a variable for this information, you didn't have to individually list each server's name with its volume or drive in the script.
Variables are used to simplify referencing something that is specific to individual servers or software run on servers. For example:
Each of these can have different data per server. Variables allow you to account for those differences easily.
Variables can be thought of as having three parts: name, value, and usage. The syntax for each is:
Example: DEST
Value Syntax: value_of_variable
Example: sys:
Example: %DEST%
Thus, the variable DEST would equate to sys: on the particular server where the variable is defined.
When defining a variable, you do not provide the % character for the variable's name or value. However, when using the variable, you use the % character before and after its name.
The software uses the % character to identify the beginning and ending of variable names. For example:
You can nest variables to any level. For example, you can do the following to automate destinations:
The result is that you can define the destination as simply DEST, which resolves to the directory and volume or drive specified at each target server. For example:
The % symbol is a valid character for file and directory names. Therefore, you need to identify literal usage of a % character. Otherwise, the software would think a nested variable name was being provided.
Literal % characters are identified by adding an extra % character immediately before a % character in the variable's value. This makes the software recognize the % character as a literal character and not a variable indicator. For example:
Path for the Variable: temp%abc%xyz
Variable Value: temp%%abc%%xyz
The first % lets the software know that the next % character is literally part of the pathname, and not an indicator that a nested variable name is next. Without the double % characters, "abc" would be interpreted as a nested variable name.
General variable definitions, such as those in the Tiered Electronic Distribution policy, provide default variable values for Subscribers where they have none defined. Variables defined in a Subscriber object override such default variable values.
For Server Software Packages, variable names are resolved differently:
IMPORTANT: A variable defined in a software package overrides any value defined in the Subscriber.
Variables are checked for in a specific order to determine which variable to use. The order is:
1 User-defined in Server Management
2 Predefined
The variable is used from the first place where it is found.
Variables can also be used to specify where a Distribution is to be extracted, including the full path.
For example, you have a single Distribution with 20 Subscribers. You want to extract the Distribution to a specific volume on each of the Subscriber's servers. However, the volume name varies from server to server: 15 servers are using the data: volume and five are using vol1:.
You can edit the Distribution Volume variable for some of these Subscribers by changing the Resolve To field on the Subscriber from data: to vol1: for the five Subscribers using that volume.
When the Distribution is extracted, it goes to the correct volumes on each of the 20 servers.