SetNull() in loop variables performing annoyingly

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

SetNull() in loop variables performing annoyingly

Post 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)
- Zulfi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post 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.
- Zulfi
Post Reply