Page 1 of 1

ExecSH

Posted: Wed Aug 18, 2004 2:29 pm
by yiminghu
Hi,

I was trying to call a shell script within job control using routine ExecSH. But it cannot pass the compilation stage.

Does that mean I have to use ExecSH in before/After stage, if it does, how do I check the return status to know whether shell script is executed OK or not?

Actually I am always struggling using routines within job control. Don't know which file header I should include and no sample is available for me to take a look. Can you let me whether there are any tutorials about how to use routine within DS?

Thank you,

Yiming

Posted: Wed Aug 18, 2004 3:02 pm
by ray.wurlod
Look in the Routines branch of your Repository, where you will find the source code for ExecSH, complete with documentation (comments) that explain how to use it.

You need the command (the pathname of the script), with any command line arguments) in the Input Value field of the caller.

If you have this, then ExecSH is unlikely to be the problem, unless there is a problem with the way your server has been installed.

Post the error messages generated by the compiler, not forgetting anything displayed when you click the More button.

You may be missing the fact that the Catalog name for ExecSH is actually DSU.ExecSH (it's an example of how to write before/after subroutines, so is cataloged with a "user-written" prefix). What you need to do in your call is

Code: Select all

Call DSU.ExecSH(Command, ErrorCode)

Posted: Wed Aug 18, 2004 3:04 pm
by tonystark622
You can call ExecSh from a Routine Activity in a Job Sequencer job.

Put your other job in the Sequencer and the Routine Activity, either before your job, or after, as you need.

You can test the output of the shell script with the output triggers (links) from the Routine Activity stage. Or you can add a Nested Condition stage and test the Return Value of the Routine Activity stage.

Good Luck,
Tony