How to call windows script from datastage?

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
RaviM
Participant
Posts: 12
Joined: Thu Aug 19, 2004 4:13 pm

How to call windows script from datastage?

Post by RaviM »

How to call Windows script from datastage
My script name is abc.vbs ( C:\abc.vbs)
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Any DOS-level command can be executed using a Command stage or thru a subroutine, function, or Batch job using the DSExecute API.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The question would be - from where in DataStage do you want to call this script? There are at least two possible answers:

* From a Sequence job, you can use the Execute Command stage to run your batch / script file. You would put the full path to the script in the 'Command' box and any (optional) parameters it may need in the 'Parameters' area.

* From a Server job, either as a 'Before' or 'After' job subroutine using the 'ExecDOS' routine on Windows or the 'ExecSH' routine on a UNIX server. Put the entire thing - full path to the script and any parameters it may need - in the 'Input Value' box.

There are other ways outside of the GUI to do this as well but the two mentioned above are the two biggies and the easiest ways to do what you need to do.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply