9.6 Using Variables to Control File Extraction

You can use variables to control the location that files are extracted on the Subscriber. Any destination can be used as a variable defined in a Subscriber object by encapsulating it with the percent (%) symbol.

IMPORTANT:Any variable value specified in the Tiered Electronic Distribution policy is a default value and is overridden by variable values set in a Subscriber object.

For the location where files are extracted, the destination root is identified in the File Grouping dialog box as a directory named destroot. This is the top-level directory used by a Subscriber to determine where to extract the file. The dialog box lets you build groups of directories under the \destroot directory.

You can specify the destination root as a known location (for example, %APP_DIR%). You can then go to the Variables tab on the Subscriber object and specify a value for this variable.

For example, variable APP_DIR would have the value:

sys:\apps

To use a variable to set the location that files are extracted to:

  1. In ConsoleOne, right-click the Subscriber object, then click Properties.

  2. Select the Variables tab, then click Add.

  3. Provide the name of the variable.

    The name can be user-defined, an environment variable (Java or native), or a predefined variable.

  4. Provide the value for the variable.

    The value is what the variable resolves to. It can also be another variable for nesting variables.

    To ensure that extraction takes place, provide an absolute path to the Subscriber. For example, if the path is only the data: volume, make sure the colon (:) is included, because it is a necessary part of the full path.

  5. Provide a description (optional), then click OK twice to exit the properties.

  6. Create a new Distribution object.

    For information, see Section 3.4.4, Creating a Distribution.

  7. In the Distribution object’s properties, select the Type tab, select File in the Select Type drop-down box, then click New Target.

  8. Replace the default %DEST_VOLUME% with the variable name, then click OK as necessary to exit the properties.

    A directory named \dest_volume is created by default in the Destination column. You should select this directory to change the destination root. To select it, select the actual directory name (destroot). You can then specify a known location or use a variable with surrounding percent symbols.