To call a shellscript within User Defined Server Routine
Moderators: chulett, rschirm, roy
To call a shellscript within User Defined Server Routine
Hi,
I have a shellscript.
It needs to be called from a user defined subroutine.
How can i do it.
I have a shellscript.
It needs to be called from a user defined subroutine.
How can i do it.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The first argument of DSExecute() is the shell in which the command is to execute. It might be "SH" (on UNIX), "DOS" (on Windows) or "UV" (for the UniVerse shell).
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.
Hi all,
Thank you very much now i am able to call the shellscript.
Suppose i need to pass a argument to the DSexecute command from a function i.e.
s = Arg1
Call DSExecute('UNIX','sh check.sh s',Output, SystemReturnCode)
But i am not able to pass the actual value.
Kindly advice.
Thank you very much now i am able to call the shellscript.
Suppose i need to pass a argument to the DSexecute command from a function i.e.
s = Arg1
Call DSExecute('UNIX','sh check.sh s',Output, SystemReturnCode)
But i am not able to pass the actual value.
Kindly advice.
Last edited by prem84 on Thu Sep 02, 2010 10:59 pm, edited 1 time in total.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
That is because you are giving 's' within quotes which will interpret as a literal string.
Try
Try
Code: Select all
'sh yourShellScript ': s
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact:
May be try something like thisprem84 wrote:Hi all,
Thank you very much now i am able to call the shellscript.
Suppose i need to pass a argument to the DSexecute command from a function i.e.
s = Arg1
Call DSExecute('UNIX','sh check.sh s',Output, SystemReturnCode)
But i am not able to pass the actual value.
Kindly advice.
Code: Select all
vCmd = 'sh check.sh' : s
Call DSExecute('UNIX',vCmd,Output, SystemReturnCode)
Arun