Remote exec

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
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Remote exec

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

Hi Arnd,

Thanks for your response.

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

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

Post 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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Excellent! Thank you. :D
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