Statement order

Data Migrator Administration Guide for Hitachi NAS Platform

Version
14.8.x
Audience
anonymous
Part Number
MK-92HNAS005-31

Statement order is critical. Statements are evaluated top-down, starting with the first statement defined. Therefore, as the following examples illustrate best practice usually specifies EXCLUDE statements at the top of the rule.

Rule scenario A:

INCLUDE (<PATH /Temp> AND <FILENAME *.mp3>)

EXCLUDE (<ACTIVE_WITHIN 14>)

EXCLUDE (<FILE_SIZE_UNDER 2MB>)

The above rule is interpreted as:

  • IF path name includes /Temp AND file name is *.mp3 THEN MIGRATE.
  • IF file is active less than 14 days AND less than 2 MB in size THEN EXCLUDE.

In scenario A, all the .mp3 files under /Temp will be migrated based on the first INCLUDE statement. Statements 2 and 3 are disregarded since they are evaluated after the more inclusive INCLUDE statement that has already added what rules 2 and 3 are trying to exclude.

Rule scenario B:

If the same rules were ordered differently:

EXCLUDE (<FILE_SIZE_UNDER 2MB>)

EXCLUDE (<ACTIVE_WITHIN 14>)

INCLUDE (<PATH /Temp> AND <FILENAME *.mp3>)

The above rule is interpreted as:

  • IF file is less than 2 MB in size OR active less than 14 days THEN EXCLUDE.
  • IF path name includes /Temp AND file name is *.mp3 THEN MIGRATE.

In this scenario, only .mp3 files greater than 2 MB in size that have been inactive for greater than 14 days will be migrated.