SPL and OS-file
Posted in 1999
Topics: Stored Procedures & SPL
Hi, Is it possible to write to a file from stored procedure ? I need it to implement sending messages from within stored procedure. Any other ideas are welcome. Thanks. Jaroslaw.
Sure, just use the SYSTEM command to execute any operating system command
like (on UNIX, e.g.):
...
LET c_var = 'This is a message';
SYSTEM 'echo "' || c_var || '" >file';
The working directory is most probably the one you started the application
from.
For the more complicated tasks I usually use a shell script, which can
itself execute SQL statements by issueing commands like:
echo 'select field from table' | dbaccess dbname
hth
Christoph
Jaroslaw Pulkiewicz <pulkiewi@quantum.de> schrieb in im Newsbeitrag:
37FB6EE8.99911449@quantum.de...
> Hi,
>
> Is it possible to write to a file from stored procedure ?
> I need it to implement sending messages from within stored procedure.
> Any other ideas are welcome.
>
> Thanks.
> Jaroslaw.
>