RE: Informix 5.x .Stored Procedure problem. Help !!!
Posted in 2000
There are several ways to solve this.
You could store the path and executable name in a table then do:
select path
into shell_string
from sometable
where whatever;
system shell_string;
or you could pass a parameter indicating which instance you're running,
then do an if statement:
if param1 = "instance1" then
let shell_string = "path1/prog.exe";
else
let shell_string = "path2/prog.exe";
end if
system shell_string;
Or you could call one common shell script that in turn calls the
executable:
system "/run_prod.shl"
them system.shl would contain the path to the executable on the
particular instance.
I'm sure there are other ways of skinning this particular cat, one of
which will surely fit your needs. If you have some limitation that you
haven't mentioned that makes each of these impossible, send me an e-mail
and I'm sure we can figure something out.
HTH
-----Original Message-----
From: i.sokolsky@geac.com (Igor) [mailto:i.sokolsky@geac.com]
Sent: Thursday, March 23, 2000 10:16 AM
Posted To: informix
Conversation: Informix 5.x .Stored Procedure problem. Help !!!
Subject: Informix 5.x .Stored Procedure problem. Help !!!
Hi All!!
I have a Stored Procedure , which calls executable.Everything works
fine if we working with instance 1, because path to this executable
hardcoded in SP. If we change our instance to instance 2, SP still
looking for executable in same direcory of instance 1 and fail.
For each instance we need to change our path in SP.
As far as I know there is no Trim or whatever squeeze functions in
this ver. of Informix.
How can I do my path flexible?
Regards
Igor