Using Variables to Control File Extraction

You can use variables to control the location that files are extracted to 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 will be 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.

The destination root can be specified 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 Value

APP_DIR

SYS:\APPS

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

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

  2. Click the Variables tab > click Add.

  3. Enter the name of the variable.

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

  4. Enter the value for the variable.

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

    To ensure that extraction will take 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. Enter a description (optional) > click OK > OK (to exit the properties).

  6. Create a new Distribution object.

    For information, see Creating the Distribution .

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

  8. Replace the default %DEST_VOLUME% with the variable name > 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, click the actual directory name (DestRoot). You can then specify a known location or use a variable with surrounding percent symbols.