Page 1 of 1

calling routine/job across proejcts

Posted: Wed Nov 19, 2008 9:37 am
by ratikmishra1
Hi,
Is it possible to call a routine and/or job that reside in project say 'common' from another project s say 'finance' , 'hr' etc.

I'd like to call them from a sequence(preferable) or a stub subroutine.

Thanks
Rati

Posted: Wed Nov 19, 2008 10:02 am
by chulett
Not sure about the routine, anything like a Routine Activity is going to be tied to the Project the Sequence is running in. However, jobs can be run 'cross project' if you leverage dsjob from the command line rather than using a Job Activity stage.

In other words, use an Execute Command stage and a 'wrapper' script for dsjob. That or a routine via a Routine Activity stage that uses DSExecute() to do the same.

Posted: Wed Nov 19, 2008 10:17 am
by ratikmishra1
Thank you Chulett. I am looking dir direct usage if possible, not via shell wrapper. I am thinking in terms a common project which would have the utility routines and the jobs. Any developer working in different projects should be able to reference them (not copy to their project) via some mechanism.

Posted: Wed Nov 19, 2008 10:22 am
by chulett
Would be nice, but no it doesn't work that way.

I do use the concept of a 'common project' for standard routines, the project where they are developed and tested but we still need to promote read-only copies to every project for people to be able to use them.

Posted: Wed Nov 19, 2008 1:06 pm
by ray.wurlod
Can't see why not. A parallel routine definition (a pointer to the actual routine) would have to be set up in each project that needs to use it, but there need only be one actual routine.

:idea:
Be very, very careful to undertake regression testing if you ever plan to change this routine, and add emphatic comments to the source code to explain that it is a shared routine!

Posted: Wed Nov 19, 2008 1:38 pm
by chulett
OK, the 'parallel' qualifier being key here. Lost track of what forum I was in there for a sec. :wink:

Posted: Wed Nov 19, 2008 1:45 pm
by ray.wurlod
It's also possible for server routines using global cataloging, but I don't want to go there. It's a maintenance nightmare.

Posted: Wed Nov 19, 2008 1:48 pm
by chulett
Yah, best to keep that one under wraps.

Posted: Thu Nov 20, 2008 10:04 am
by ratikmishra1
Ray,
I'd like to know more about global cataloging. Does it include both the jobs and routines?

Will appreciate your inputs. To begin with please suggest some reading materials where I can find some more information on this so that I can come back with more precise questions.

thanks
Rati

Posted: Thu Nov 20, 2008 2:16 pm
by ray.wurlod
I've already said I'm not going there.

All the information you need is in the DataStage BASIC manual. Go ahead, build yourself and your successors a maintenance nightmare!

Posted: Fri Nov 21, 2008 1:02 pm
by ratikmishra1
Thank you all the same.