I have a job activity in a sequencer. I would like to run an after-job subroutine for the job. I am going to use the ExecSh command to run a shell script. A parameter needs to be passed to the shell script. Will I be able to do something like:
execSH("ksh MyShell.ksh Prm1")? How do I pass the parameter?
Thanks.
ExecSH using after-job subroutine
Moderators: chulett, rschirm, roy
Select ExecSH from the after job subroutine from the job you want it to run after.
In the Input Value, cd to the location of your script and run your script.
Ex
Or you could also an Execute Command sequence in your Job Sequence after the Job Activity , but here you will have to pass the parameters in the "Parameter" text box.
In the Input Value, cd to the location of your script and run your script.
Ex
Code: Select all
cd /script_location; PPMyShell.ksh Prm1
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
To run ExecSH itself as the after-job subroutine, simply put the command line argument after the command pathname in the Input Values field.
To call ExecSH from your own routine you need simply add the command line argument to the command line issued.
If you mean "job parameter" here, rather than command line argument, use a job parameter reference (surrounded by "#" characters) following the command pathname in the first case. In the second case, determine the value of the job parameter using DSGetParamInfo() and build the command line using that value.
To call ExecSH from your own routine you need simply add the command line argument to the command line issued.
If you mean "job parameter" here, rather than command line argument, use a job parameter reference (surrounded by "#" characters) following the command pathname in the first case. In the second case, determine the value of the job parameter using DSGetParamInfo() and build the command line using that value.
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.
Where does your script reside?
You need to go to that particular directory and then execute it.
cd to that location, then execute your script.(Hope you are doing that)
You dont need the ksh in front of the script, you could just execute it like below
You need to go to that particular directory and then execute it.
cd to that location, then execute your script.(Hope you are doing that)
You dont need the ksh in front of the script, you could just execute it like below
Code: Select all
scriptname.ksh parameter1
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.