Call .exe file thru 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
rajeevs
Participant
Posts: 14
Joined: Thu Jan 12, 2006 10:42 am

Call .exe file thru DataStage

Post by rajeevs »

Hello All:

Could somebody help us call a .exe file through DataStage Server on Windows. The .exe file was created through VB and i need to run the .exe first and then kick-off the DataStage server job.

I tried to call them using the Execute Command stage through Sequencer - but could not do so. I also tried to call the .exe thru a batch file and call the .bat file thru a before-job subroutine, but could not do it either..
Below is the log:
*******************************
*** Output from command was: ***
'xxx.bat' is not recognized as an internal or external command,
operable program or batch file.
*******************************

Any help would be appreciated !!

-Raj
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Fully path the bat file.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

CWD is always the project. It's dangerous to not fully qualify all scripts and paths.
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
rajeevs
Participant
Posts: 14
Joined: Thu Jan 12, 2006 10:42 am

Post by rajeevs »

The entire path for the .bat file was already given.. I editied out the log in my previous message..

-Raj
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Not to insult your intelligence, but the job runs on the server, therefore the paths must be local to the server. Any chance you're trying to run a file on your PC and not on the server?
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
rajeevs
Participant
Posts: 14
Joined: Thu Jan 12, 2006 10:42 am

Post by rajeevs »

Yep, the path was pointing to the server and not to my Local folders :)
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Then the path (which you have not shared) must be the problem. From your Batch job, use the DSLogInfo to log the command you are trying to execute. Maybe even do a "dir" command with DSExecute first on the file to see if the path resolves to the physical .bat file. Log the screen output from the dir command to see what DataStage "sees".
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
rajeevs
Participant
Posts: 14
Joined: Thu Jan 12, 2006 10:42 am

Post by rajeevs »

Ken:

The DataStage job is calling the .bat file but it looks like the job is running for ever. It doesn't stop.

I tried running the .exe file directly from the server. It runs sucessfully in the server. Is there something that i am missing before calling the .exe file thru DataStage. Kindly advise!!

-Raj
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

I suggest putting some "mile marker" actions into the bat script, such as creating a file right before running the exe to see if the your bat script even gets to that point.

DS can run any command line program as long as that program doesn't attempt any GUI i/o or such. If the program has those activities, you will hang the job. The only way to kill it is to go onto the server and kill the process in Task Manager. Hopefully, the job will free itself up.
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
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

If you created your exe with a GUI screen then it maybe locking up waiting for input. These exe files do not like to run in the background.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try using the DOS start command to execute your BAT file. This starts a separate window to run the command.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply