Pass valus to UNIX script fromDS control job
Moderators: chulett, rschirm, roy
Pass valus to UNIX script fromDS control job
How can i pass some values from a datastage control job to a UNIX script-
Script is used to send mail-i have to pass msg body to the script.
please provide the syntax-in ds side and unix side
Script is used to send mail-i have to pass msg body to the script.
please provide the syntax-in ds side and unix side
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact:
You need to quote it right as well to get the arguments correct. Under the covers these command are calling the execute command in BASIC.
Code: Select all
Cmd = 'SH "ShellScript Arg1 Arg2"'
execute Cmd capturing Output returning ReturnCode
Mamu Kim
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
A small change if I may. Use the -c option for SH to effect a return of control when completed.
My personal preference is to use DSExecute().
It achieves the same result as the Execute statement.
Code: Select all
Cmd = 'SH -c "ShellScript Arg1 Arg2"'
Execute Cmd capturing Output returning ReturnCode
Code: Select all
Cmd = "ShellScript " : Arg1 : " " : Arg2
Call DSExecute("UNIX", Cmd, Output, ExitStatus)
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.