Download Universal Data Mover 3.2.0 User Guide
Transcript
if Statement UDM Scripting Language EQ - Equal The equal comparator, EQ, evaluates to true if both the left and right-hand values are equal to each other. If one or more of the values contains alpha characters (non-numeric), the comparison is case insensitive. That is, a word that is all lower case would be equal to the same word if it were all upper case (for example: dog would be equal to DOG). Here are some examples of some if statements using the equal comparator: if $(filename) EQ myfile.txt print msg="The name of the file is myfile.txt" end if 8 EQ $(_lastrc) print msg="The last command resulted in an error" end if $(filename.exists) EQ yes print msg="The filename variable exists" end NE - Not Equal The not-equal comparator, NE, evaluates to true if the left-hand value is not the same as the right-hand value. As with the equal comparator, alpha character comparisons are case insensitive. The following are some examples of the not-equal comparator: if "C:\Program Files\Universal" NE $(mydir) print msg="This is not the Stonebranch application directory" end if 8 NE 0 print msg="This will always print as 8 is not equal to 0" end if $(filename.exists) NE no print msg="The filename variable exists" end udm-user-3207 Confidential & Proprietary 193