Looping in DataStage Jobs

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
datastagenewbie
Participant
Posts: 64
Joined: Tue Sep 23, 2008 9:54 am

Looping in DataStage Jobs

Post 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.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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.
datastagenewbie
Participant
Posts: 64
Joined: Tue Sep 23, 2008 9:54 am

Post by datastagenewbie »

The list of conditions will be stored in an input file.

Thanks for responding.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Can you post some lines with pseudo-code of what you expect to happen.
datastagenewbie
Participant
Posts: 64
Joined: Tue Sep 23, 2008 9:54 am

Post by datastagenewbie »

<<Msg>>
Last edited by datastagenewbie on Tue Jul 14, 2009 1:13 pm, edited 1 time in total.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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?
datastagenewbie
Participant
Posts: 64
Joined: Tue Sep 23, 2008 9:54 am

Post by datastagenewbie »

All column validations will be done prior to reaching this step.
datastagenewbie
Participant
Posts: 64
Joined: Tue Sep 23, 2008 9:54 am

Post 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!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
suresh.angadi
Participant
Posts: 17
Joined: Tue Jun 23, 2009 6:44 pm

Re: Looping in DataStage Jobs

Post 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.
Suresh Angadi
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Suresh,

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