Re: SPL and OS-file
Posted in 1999
You'll probably want to use an append redirection ">>", i.e.
SYSTEM 'echo "' || c_var || '" >>file';
not standard redirection ">" which will erase the existing file(if any).
Paul Storm
> From: "Christoph K'nzle" <christoph.kuenzle@bluewin.ch>
> To: informix-list@iiug.org
> Subject: Re: SPL and OS-file
> Date: Wed, 6 Oct 1999 21:10:36 +0200
> X-List-Gateway: comp.databases.informix
>
> 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.
> >
>
>