Operator functions (DataStage®)
You can use operator functions to perform various operations.
- EQ (Equal to)
- Compares if two objects are the same.
- Input: object1 (any), object2 (any)
- Output: 0 or 1 (int8)
- Examples. If mylink.myobject1 contains "AAA" and mylink.myobject2 contains "AAA", then
the following function returns 1 (true):
If mylink.myobject1 contains "AAA" and mylink.myobject2 contains "BBB", then the following function returns 0 (false):EQ(mylink.myobject1, mylink.myobject2) EQ("AAA", "AAA")
EQ(mylink.myobject1, mylink.myobject2) EQ("AAA", "BBB")
- GE (Greater than or equal to)
- Takes two objects as parameters and returns true if the first object is greater than or equal to
the second.
- Input: object1 (any), object2 (any)
- Output: 0 or 1 (int8)
- Examples. If mylink.myobject1 contains 123 and mylink.myobject2 contains 123, then the
following function returns 1 (true):
If mylink.myobject1 contains 123 and mylink.myobject2 contains 124, then the following function returns 0 (false):GE(mylink.myobject1, mylink.myobject2) GE(123, 123)
GE(mylink.myobject1, mylink.myobject2) GE(123, 124)
- GT (Greater than)
- Takes two objects as parameters and returns true if the first object is greater than the second.
- Input: object1 (any), object2 (any)
- Output: 0 or 1 (int8)
- Examples. If mylink.myobject1 contains 123 and mylink.myobject2 contains 122, then the
following function returns 1 (true):
If mylink.myobject1 contains 123 and mylink.myobject2 contains 124, then the following function returns 0 (false):GE(mylink.myobject1, mylink.myobject2) GE(123, 122)
GE(mylink.myobject1, mylink.myobject2) GE(123, 124)
- LE (Less than or equal to)
- Takes two objects as parameters and returns true if the first object is less than or equal to
the second.
- Input: object1 (any), object2 (any)
- Output: 0 or 1 (int8)
- Examples. If mylink.myobject1 contains 122 and mylink.myobject2 contains 122, then the
following function returns 1 (true):
If mylink.myobject1 contains 123 and mylink.myobject2 contains 122, then the following function returns 0 (false):LE(mylink.myobject1, mylink.myobject2) LE(122, 122)
LE(mylink.myobject1, mylink.myobject2) LE(123, 122)
- LT (Less than)
- Takes two objects as parameters and returns true if the first object is less than the second.
- Input: object1 (any), object2 (any)
- Output: 0 or 1 (int8)
- Examples. If mylink.myobject1 contains 121 and mylink.myobject2 contains 122, then the
following function returns 1 (true):
If mylink.myobject1 contains 121 and mylink.myobject2 contains 120, then the following function returns 0 (false):LE(mylink.myobject1, mylink.myobject2) LE(121, 122)
LE(mylink.myobject1, mylink.myobject2) LE(121, 120)
- NE (Not equal to)
- Compares if two objects are not the same.
- Input: object1 (any), object2 (any)
- Output: 0 or 1 (int8)
- Examples. If mylink.myobject1 contains "AAA" and mylink.myobject2 contains "BBB", then
the following function returns 1 (true):
If mylink.myobject1 contains "AAA" and mylink.myobject2 contains "AAA", then the following function returns 0 (false):NE(mylink.myobject1, mylink.myobject2) NE("AAA", "BBB")
NE(mylink.myobject1, mylink.myobject2) NE("AAA", "AAA")