Calling Script from DS Routine

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
SharingDS
Participant
Posts: 12
Joined: Fri Apr 28, 2006 8:58 pm

Calling Script from DS Routine

Post by SharingDS »

Hi Gurus,
I have a Shell Script (For moving files from One directory to another directory) which i want to call from DataStage routine by passing the Parameteres (As Src Directory and Tgt Directory) to the script.

Anyone tell me, Can DataStage Executes Unix Shell Script from Routine.


Thanks in Advance
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes.

Code: Select all

Call DSExecute("UNIX", path_of_script, Output, ExitStatus)
The first two arguments are input, the final two are output. Output is any output from the script, ExitStatus is the exit status of the script.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SharingDS
Participant
Posts: 12
Joined: Fri Apr 28, 2006 8:58 pm

Post by SharingDS »

Thanks a lot Ray.

I m able to do it .....
Post Reply