Page 1 of 1

Remote exec

Posted: Wed Feb 15, 2006 12:14 am
by elavenil
Hi,

Calling a batch file using DSExecute and the btach file is running fine. But batch file execution takes few minutes and the job completed before the batch file execution completes. We used to execute batch file/shell script in our previous projects and remembered that we got to do something with remote exec but i could not remember the steps to resolve this issue.

Can you someone share the steps required to resolve the above issue.

Thanks in advance.

Regards
Elavenil

Posted: Wed Feb 15, 2006 1:53 am
by ArndW
Elavenil,

what is the issue - the DSExecute() call won't return until the program it calls finishes - so if your external batch script finishes after the job then it must be starting off a background process. Is your intent to have the DataStage job wait until the other background process completes? If so, you need to have some way of coordinating between the two processes. Perhaps an empty control file could be used as a means of flagging execution and completion.

Posted: Wed Feb 15, 2006 3:29 am
by elavenil
Hi Arnd,

Thanks for your response.

Managed to do this by enabling few flags available in load command itself.

Regards
Saravanan

Posted: Wed Feb 15, 2006 3:48 pm
by ray.wurlod
elavenil wrote:Hi Arnd,

Thanks for your response.

Managed to do this by enabling few flags available in load command itself.

Regards
Saravanan
We like to share solutions here. Which flags, in what load command?

Posted: Wed Feb 15, 2006 10:25 pm
by elavenil
Hi Ray,

The used switches are /c /w. /c - the issued command will be invoked in the command window and /w - the command window will not be closed till the execution of the issued command is completed.

Hope this would help you to understand how we resolved the problem and this was implemented as our DBA suggessted.

Regards
Elavenil

Posted: Wed Feb 15, 2006 11:41 pm
by ray.wurlod
Excellent! Thank you. :D