Procedure in ksh [message #305080] |
Sat, 08 March 2008 04:21  |
arienaji
Messages: 2 Registered: March 2008
|
Junior Member |
|
|
Am writing a code wherein am executing a procedure from a ksh script. the procedure requires a date as one of the parameter. I have to manipulate the sydate and pass that value to that parameter.
how to go about it.
|
|
|
|
Re: Procedure in ksh [message #305087 is a reply to message #305083] |
Sat, 08 March 2008 05:43   |
arienaji
Messages: 2 Registered: March 2008
|
Junior Member |
|
|
Thanks Raj.
But the link doesnt give me the result what i want.
This is my code snippet
--------------
#!/bin/ksh
export emp_id=100
a=$(sqlplus -s $DATABASE <<-EOF
var returnid number;
select sysdate+2/86400 today from dual;
exec kickoff(${emp_id},:today,,:returnid);
commit;
print returnid;
EOF
)
-----------------
My procedure kickoff has two IN paramaters and one OUT parameter. One of the IN parameter(emp_id), am getting is from my shell and passing it here.
The second IN parameter needs a date which is 10 seconds from sysdate. I want this one to be calculated and passed on to the procedure. For that I was thinking of manipulating the sysdate by querying the dual, somehow store it in a variable and pass it to the procedure. And this is where am failing.
Any help will be greatly appreciated.
Thanks in advance
|
|
|
|
|