Page 1 of 1

Looping in DataStage Jobs

Posted: Mon Jul 13, 2009 9:51 am
by datastagenewbie
Hi !
I have x number of conditions that I need to check. And if first condition passes, I don't need to go to the next one, otherwise I have to check the next condition, so on until all x conditions are checked.
x is a varibale .
Can anyone suggest me a way of achieving this in DataStage?
Any help is appreciated.

Thanks
S.

Posted: Mon Jul 13, 2009 10:17 am
by Sainath.Srinivasan
You may have to write a routine for that.

But what is the controlling factor and where do you intend to store the list of conditions? How do you plan to use them?

Will they always use only one column or will multiple column come into picture?

You have loads of questions to answer before going down this route.

Posted: Mon Jul 13, 2009 10:17 am
by Sainath.Srinivasan
You may have to write a routine for that.

But what is the controlling factor and where do you intend to store the list of conditions? How do you plan to use them?

Will they always use only one column or will multiple column come into picture?

You have loads of questions to answer before going down this route.

Posted: Mon Jul 13, 2009 10:26 am
by datastagenewbie
The list of conditions will be stored in an input file.

Thanks for responding.

Posted: Mon Jul 13, 2009 2:16 pm
by Sainath.Srinivasan
Can you post some lines with pseudo-code of what you expect to happen.

Posted: Mon Jul 13, 2009 2:45 pm
by datastagenewbie
<<Msg>>

Posted: Mon Jul 13, 2009 3:04 pm
by Sainath.Srinivasan
I am quite confused on how you arrived at each step.

Also how are you going to trap for any errors / mistakes. For example if the incoming record does not have NAME column, what must happen and how do you plan to do it?

Posted: Mon Jul 13, 2009 3:33 pm
by datastagenewbie
All column validations will be done prior to reaching this step.

Posted: Mon Jul 13, 2009 3:35 pm
by datastagenewbie
Sainath.Srinivasan,
I can't see your complete message, bcoz I am not a premium member. Is there anyway you can not classify it as a premium content. Thanks!

Posted: Mon Jul 13, 2009 4:42 pm
by ray.wurlod
datastagenewbie wrote:Sainath.Srinivasan,
I can't see your complete message, bcoz I am not a premium member. Is there anyway you can not classify it as a premium content. Thanks!
He could, but he won't. Premium membership is one of the ways that the hosting and bandwidth costs of DSXchange are met. We're not going to set any precedent that might undermine that, because we want to see DSXchange continue. Premium membership is not expensive, at less than 30c (Rs12) per day.

Re: Looping in DataStage Jobs

Posted: Tue Jul 14, 2009 12:32 am
by suresh.angadi
hi,

you can implement that loop condition with if else condition along with the logical operators in transformer stage.

if else condition for both input data and reference data.

Regards
Suresh
datastagenewbie wrote:Hi !
I have x number of conditions that I need to check. And if first condition passes, I don't need to go to the next one, otherwise I have to check the next condition, so on until all x conditions are checked.
x is a varibale .
Can anyone suggest me a way of achieving this in DataStage?
Any help is appreciated.

Thanks
S.

Posted: Tue Jul 14, 2009 1:46 am
by Sainath.Srinivasan
Suresh,

If the conditions are constant, you can implement in transformer. But the query is to have 'variable' conditions.