Datastage Transformer Null handling
Posted: Thu Sep 16, 2010 7:20 pm
Hi All,
I am using datastage 8.1 and have issues with null handling.
In a Transformer, have an input filed as Varchar. The output from the Transformer is varchar.
The Output is then used to update an Oracle table.
The following are the rules with examples:
Input value Output value
Smith Smith
(null) (null)
Space (null)
Smith with trail spaces Smith (without spaces)
The questions:
1. Is there a function in datastage that will give me Null as a result of removing all the blanks from a field?
2. Using TRIM on the 3rd example, what is the result? Empty String or Null string ?
3. Is there a function to turn Empty to Null?
4. What functions can I use to get the above, if I am using stage variables ( that can not be nulls)?
Thanks in advance.
Regards, Walter
I am using datastage 8.1 and have issues with null handling.
In a Transformer, have an input filed as Varchar. The output from the Transformer is varchar.
The Output is then used to update an Oracle table.
The following are the rules with examples:
Input value Output value
Smith Smith
(null) (null)
Space (null)
Smith with trail spaces Smith (without spaces)
The questions:
1. Is there a function in datastage that will give me Null as a result of removing all the blanks from a field?
2. Using TRIM on the 3rd example, what is the result? Empty String or Null string ?
3. Is there a function to turn Empty to Null?
4. What functions can I use to get the above, if I am using stage variables ( that can not be nulls)?
Thanks in advance.
Regards, Walter