compilation error - transformer stage

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

Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Post by Nageshsunkoji »

Hi,

The main reason for your problem in compilation is, your using Isnotnull and substring function together on same field and at the same time.

So, Split the condition and use the logic like these.....

If Col1='A' Then If Isnotnull(Column2) Then Column2[1,7] Else Setnull() Else Setnull()
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
ajith
Participant
Posts: 86
Joined: Thu Nov 10, 2005 11:10 pm

Post by ajith »

You cannot Use Null validation functions along with Null handling functions ...

Try to do the null handling without using the null handling functions by equating to '' . I think that will sort that out..

Hope that helps ..
Ajith
KadetG
Participant
Posts: 30
Joined: Mon Nov 06, 2006 12:43 pm

Post by KadetG »

sorry I don`t fined as I can delete my post
Last edited by KadetG on Wed Dec 13, 2006 5:06 am, edited 1 time in total.
Alex
ajith
Participant
Posts: 86
Joined: Thu Nov 10, 2005 11:10 pm

Post by ajith »

thebird wrote:Why not try replace the IsNull()/IsNotNull() with a NullToEmpty like this -

Code: Select all

If (i/p_column1 = "A" AND trim(NullToEmpty(ip_column2))<>"") Then ip_column2[1,7] ELSE SetNull()
Or if you want to use to IFs (not adviced) -

Code: Select all

If i/p_column1 = "A" Then (If trim(NullToEmpty(ip_column2))<>"" Then ip_column2[1,7] ELSE SetNull()) Else SetNull()
Aneesh
What aneesh says is right. I got this problem resolved when I did that.
Do not use any null handling functions along with trim. I am sure that that will sort the problem out

Code: Select all

If (i/p_column1 = 'A' AND TrimLeadingTrailing(ip_column2)<>'') Then ip_column2[1,7] ELSE SetNull()
Post Reply