running Routines from unix prompt.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dsxdev
Participant
Posts: 92
Joined: Mon Sep 20, 2004 8:37 am

running Routines from unix prompt.

Post by dsxdev »

Hi
Is there any posibility to execute routines through unix scripts?
If so how can this be achieved ?
When we write routines where does DataStage store these routines and in what form does it store. Can we access this Data Stage Repository?
Happy DataStaging
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
with Server jobs, you can use DSExecute or EexecSH to run OS command lines and getting he return code and output of that command line, hence running a shell script and even getting value/s back is possible.
the question is what does the script do?
could it be done in a DS routine?
if you'll post what the script does people might propose a best practice for it if a better option to acomplish the task exists.

You could use the dsjob command line interface to run ds jobs hence invoking the routine in that mannor.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Post by ogmios »

Roy,

I think the question is the other way around, they apparantly want to execute DataStage routines from a UNIX script, not UNIX scripts from DataStage jobs.

Answer would be no. dsxdev, what do you want to execute a DataStage routine for? You can execute DataStage jobs from UNIX with dsjob, but nothing exists for routines, how would you want to execute a routine without established environment, e.g. if you write something to the log in such a routine where should this information be logged in DataStage?

Ogmios
In theory there's no difference between theory and practice. In practice there is.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Because Routines have arguments, and because the UNIX shell has no argument-passing mechanism, what you seek to do is not possible.

You would need to create a wrapper program (see my recent post on this), which you can not do using DataStage clients.

Use the right tool for the right job.

For something to be run from the UNIX shell's command line, create a UNIX executable or shell script.

For something to be executed in the dssh shell, use the appropriate mechanism (for example the Test grid for a 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.
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

Hi,

The wrapper program can be a datastage job.
Write a datastage job that activates your routine and you can execute this job from the dsjobs exe.


HTH,
Amos
Post Reply