Page 1 of 1

SetNull() in loop variables performing annoyingly

Posted: Thu Jan 24, 2013 1:07 pm
by zulfi123786
We are running version 8.5.0.1 and I have mapped a nullable field to a loop variable and found that this loop variable always passes default values to the output colum when the input column is NULL .

Ran a check by applying SetNull() to see if the loop variables can hold NULLS (i dont see any property in the loop variables properties and there is not documented point about loop variables holding NULLs :? ) and I found that the loop variable is not holding NULL instead its defaulting the values. But the same SetNull() to a loop variable returns NULL in a transformer of another job .

Has anyone faced the same ? (the transformers are identical with no Legacy null handling)

Posted: Thu Jan 24, 2013 1:35 pm
by ArndW
Just so we are on the same page - you are talking about loop variables in Transform stages, correct?

I would guess that they are akin to stage variables, which cannot contain nulls, and think that any fix IBM will do to this behaviour will be by changing the documentation and not the functionality.

Posted: Thu Jan 24, 2013 1:49 pm
by chulett
ArndW wrote:I would guess that they are akin to stage variables, which cannot contain nulls
That hasn't been true for awhile from what I recall. The 'cannot contain nulls' part.

Posted: Thu Jan 24, 2013 2:12 pm
by zulfi123786
Craig is right. From 8.5 onwards stage variables can hold null (but the nullability YES/NO option is not available in stage variable properties) from what I recall having read what's new in this release. I have also checked this by explicitly putting nulls using setnull and passing this stage variable to output derivation and it was confirmed that stage variable can hold null.

It's only the loop variable which is giving tough time, I have read few posts here where people did complain about setnull in loop variable but nothing concrete said about it.