calling routine/job across proejcts

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
ratikmishra1
Charter Member
Charter Member
Posts: 42
Joined: Wed Aug 18, 2004 2:49 pm

calling routine/job across proejcts

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ratikmishra1
Charter Member
Charter Member
Posts: 42
Joined: Wed Aug 18, 2004 2:49 pm

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK, the 'parallel' qualifier being key here. Lost track of what forum I was in there for a sec. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
Last edited by ray.wurlod on Wed Nov 19, 2008 1:50 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yah, best to keep that one under wraps.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ratikmishra1
Charter Member
Charter Member
Posts: 42
Joined: Wed Aug 18, 2004 2:49 pm

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

Post 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!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ratikmishra1
Charter Member
Charter Member
Posts: 42
Joined: Wed Aug 18, 2004 2:49 pm

Post by ratikmishra1 »

Thank you all the same.
Post Reply