Stage Variable problem

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
somu_june
Premium Member
Premium Member
Posts: 439
Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road

Stage Variable problem

Post by somu_june »

Hi,

Iam using a stage variable "SV" and it has data type varchar 255, in derivation field for SV I have given expression as

IF ln1.DIV = '20' then (Trim(ln1.con),4) else SetNull()


When Iam compiling a job it is giving an error saying


Setting null to this non-nullable field: StageVar0_SV.


I need help in this stage variable issue. My question is can I use SetNull function in stage variable, if so how to do that


Thanks,
Somaraju.
somaraju
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The short answer is 'no'. As noted, they are non-nullable.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use an "In-band null" - a value that is valid for the data type, that represents null and that will not otherwise appear in the data. Convert this to an actual null in a downstream Modify stage using handle_null() or a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply