SetNull() Function in stage variable

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
srai
Participant
Posts: 101
Joined: Wed Feb 09, 2005 10:50 pm

SetNull() Function in stage variable

Post by srai »

Hi,

We are using the derivation in stage varibale as

If (IsNull(LNK_SRC.PARTY_NO=1)) Then SetNull() Else LNK_SRC.PARTY_NO.

We are getting compilation error as

"##E IIS-DSEE-TFEV-00026 12:11:59(010) <transform> Error when checking composite operator: Setting null to this non-nullable field: StageVar0_attrib."

Thanks.
VijayDS
Participant
Posts: 38
Joined: Thu Jun 18, 2009 3:50 am

Re: SetNull() Function in stage variable

Post by VijayDS »

SetNull() function will not work in the stage variables so you have to assign 'NULL' the in the column derivation you have to convert it into setnull().

Note: If you use SetNull() in stage variable you will get the compilation errrors.
Thanks
Vijay
ureddy
Premium Member
Premium Member
Posts: 36
Joined: Wed May 14, 2008 1:59 pm

Re: SetNull() Function in stage variable

Post by ureddy »

If I understand your requirement correctly "if the source column is null then 1 else source column". Try the below expression

If IsNull(LNK_SRC.PARTY_NO) Then 1 Esle LNK_SRC.PARTY_NO

Regards,
Ureddy
Reddy
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The limitation to have only non-null stage variables is one of a number eased in version 8.5.
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