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
ExecSH
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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
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)
Last edited by ray.wurlod on Wed Aug 18, 2004 3:13 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 483
- Joined: Thu Jun 12, 2003 4:47 pm
- Location: St. Louis, Missouri USA
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
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