Hi All,
I have a problem with the values returned by a lookup. My field is defined as Char (1) and some of the values are not matched. I have set the lookup to continue in this case. My understanding is that the value returned by the lookup will be set to null when no match was made.
However, the lookup seems to return an unindentified value. When I try to use the function IsNull(Value) in a transformer, it returns false. The test Trim(Value) = '' will also return false. But when I try AlNum(Value) the function fails telling me that a null string is being passed to the function???
When I dump the result in a flat file, I see that the value for the unmatched field is unreadable in ascii but correponds to the Hex value 0x00. This should be a Null, shouldn't it?
Any ideas how DataStage might interpret this field?
Thanks,
Mat
lookup generating null string
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
0x00 should correspond to "" rather than to NULL. You could always test against this explicit character.
0x00 is known in ASCII as NUL or "the null byte", which is where most of the confusion originates. This character is used in C programming to terminate a string. Clearly a string containing nothing but this characters is seen as empty.
0x00 is known in ASCII as NUL or "the null byte", which is where most of the confusion originates. This character is used in C programming to terminate a string. Clearly a string containing nothing but this characters is seen as empty.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Inorder to avoid this confusion i ll make sure APT_STRING_PADCHAR in administrator setting will be changed frin 0x0 to ' '.ray.wurlod wrote:0x00 should correspond to "" rather than to NULL. You could always test against this explicit character.
0x00 is known in ASCII as NUL or "the null byte", which is where most of the confusion originates. This character is used in C programming to terminate a string. Clearly a string containing nothing but this characters is seen as empty.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'