Re: system - problem sussed, use varchar instead of char
Posted in 1998
Hi,
the problem below was sorted by using varchars instead of chars
-Peter
Peter Groarke wrote:
>
> Hi,
> In a stored procedure I am trying to execute the system command,
> passing it an absolute filename, some of the components of which are
> variables.
>
> For example:
>
> -------------------------------------------
> create procedure blah()>
> define workdir char(64);
> let workdir="/tmp"
>
> system "echo hi >> " || workdir || "/foo" ;
>
> end procedure;
> -------------------------------------------
> (NB Works when I echo to "/tmp/foo")
>
> When executed always gives the SQL error 668, ISAM 172.
> I have tried other ways of building up the string but with
> no success.
>
> Any help much appreciated
>
> Thank you
>
> Peter Groarke