User`s guide
CHAPTER 5 Advanced Concepts and Tools
Userās Guide 53
Port variables
The values of the port structure are referenced as Port variables within a
component. There are automatic Port variables for both IN-Port and OUT-Port.
Port variables are valid within the component and they inherit the name and
datatype of the port structure. The name of the variable is either prefixed with
IN. for the IN-Ports or OUT. for the OUT-Ports. IN-Port variables are read-
only, OUT-Port variables can be written. The following example uses PORT
variables in an expression:
uUpper(IN.CU_NAME)
Using PORT variables in a procedure:
OUT.CU_NAME = uUpper(IN.CU_NAME);
Component variables
Component variables are created in the Property section of the component and
can be referenced inside the component. The Component Variable is only valid
inside the component. The name of the variable is prefixed by REF, for
example:
uIsNull(REF.myvariable)
Note To provide high flexibility in transformations, all port and component
variables internally use the datatype āstringā. This may result in unexpected
behavior when using numeric values. If multiplied by 1, the numeric value of
a string variable will be used in a calculation:
IN.Margin="2", IN.Price="10"
IN.Margin>IN.Price - returns TRUE
To enforce a numeric comparison use
IN.Margin*1>IN.Price*1 - returns
FALSE
Using functions
Sybase IQ ETL provides a complete set of functions and operators based on a
design that integrates complete support for the Unicode character sets.
Sybase IQ ETL functions can be recognized by the prefix
u, for example,
uConcat()
.