IF THEN ELSE Function

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
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

IF THEN ELSE Function

Post by sam334 »

All,
Need a help on IF function. This is with my old post earlier

I have data looks like,

03:12:11Available
00:10:11Busy
12:13:09Unavaialble
09:08:11On Call

Issue is that, I have output column in Ascending order,
Available,Busy,On Call,Unavailable

In transformer, I am trying to use a function, by which

If column[9,9] = "Available" then DSLink.Column else " "

So basically the available time of 03:12:11 will go to Available column. Any thought how to achieve this. Problem is, input data is not ascending order, so in put, Busy can be first and Available can be last.

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

Post by chulett »

Why not sort the data appropriately?

However, that wouldn't stop your if-then-else derivation from 'working'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Craig,
Sort could possible but I am not sure on key field.Input basically has five columns. User,interval,interval1,interval2,interval3. Let me try. Thanks.
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Yes, but not getting the IF function properly
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Then you need to explain in gory detail with examples what exactly that means. Your exact syntax, what you get, what you want to get, etc.

I'm sure the expression itself is working fine, I'm assuming it is just not working as you'd like it in the grand scheme of things. We should probably be having this conversation in your other thread since this is going to be more about your overall goal rather than just an issue with this specific 'function'...
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Do you want me to open a new thread or use this one.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

New thread? No. I would prefer this goes back to the original thread where your data examples and requirements are...
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply