Anyone can share a sample Rules based DataStage server job?
Thanks
KB
Rules Based DataStage Jobs
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You need a "rules dispatcher" routine and individual routines that check each rule, returning a true/false value. Use "indirect call" (see DataStage BASIC manual) to achieve late binding in the rules dispatcher; your job passes the rule name "Rule42" and the rule routine has a name that is, or includes, this name.
Code: Select all
FUNCTIONRuleDispatcher(RuleName, RuleData)
Ans = @FALSE
RuleSubr = RuleName
Call @RuleSubr(Ans, RuleData)
RETURN(Ans)
Code: Select all
FUNCTION Rule42(RuleData)
Ans = (RuleData = "FORTY TWO") ; * business rule
RETURN(Ans)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thanks a lot
Thanks a lot Ray, I will look into these routines further. I am also thinking other ways like using Job sequencer or Shared Container.
Thanks again for your response.
Regards,
KB
Thanks again for your response.
Regards,
KB
-
- Premium Member
- Posts: 29
- Joined: Tue Aug 14, 2012 1:06 pm
This is opening up an old thread but since the topic is related, didn't want to start a new one
With reference to the "Rules Dispatcher" approach, essentially the "Rule" still needs to be predefined in one of the routines in which case any new logical rule will still require a DataStage deployment. Correct
Here in the team we've been throwing around ideas on the board if there would be a way to apply "new" rules through a parameter or lookup table content which would of course require knowledge of the DataStage artifacts but not necessarily a DataStage deployment.
Thanks
With reference to the "Rules Dispatcher" approach, essentially the "Rule" still needs to be predefined in one of the routines in which case any new logical rule will still require a DataStage deployment. Correct
Here in the team we've been throwing around ideas on the board if there would be a way to apply "new" rules through a parameter or lookup table content which would of course require knowledge of the DataStage artifacts but not necessarily a DataStage deployment.
Thanks