Page 1 of 1

parameterize the job name in the Job Activity stage?

Posted: Fri Feb 16, 2007 10:53 am
by vinaymanchinila
Hi,

Can we parameterize the job name in the Job Activity stage? Is there a work around for it. I have some logic a seq performs, which is needed for multiple jobs, I looking a way to avoid designing a seq around all jobs instead.

Thanks,

Posted: Fri Feb 16, 2007 11:13 am
by ArndW
No, you cannot parameterize the Job Name in a Job Activity stage. But if you look at the code that is generated (look at the Job Control tab) you will see that it is a relatively short series of calls; so you can create your DataStage routine which will take the job name and the list of parameters and execute a give job for you.

Posted: Fri Feb 16, 2007 11:50 am
by narasimha
Check the sdk routine "UtilityRunJob" (Not sure if it exists in the PX edition)

Posted: Fri Feb 16, 2007 11:53 am
by DSguru2B
narasimha wrote:Check the sdk routine "UtilityRunJob" (Not sure if it exists in the PX edition)
That routine can run any job, provided its called from within a server job or a Basic routine.

Posted: Fri Feb 16, 2007 12:10 pm
by narasimha
DSguru2B wrote:That routine can run any job, provided its called from within a server job or a Basic routine.
Thanks for the clairfication

Posted: Fri Feb 16, 2007 2:38 pm
by ray.wurlod
Why hide the logic, and make life difficult for future maintainers? Surely there can't be that many different jobs involved. Put your decision logic into a Nested Condition activity, and emplace specific Job activities for each of the jobs on the appropriate outputs (triggers) from the Nested Condition activity. Then it's clear to all what you intend. An annotation near the Nested Condition activity summarizing the decision process would help also.