Re: Probs with system command in SPL
Posted in 1996
Excuse me for my english, pls.
David Williams wrotes:
>Message-ID: <2npX3KAYTD0xEwJU@smooth1.demon.co.uk>
>References: <6BXPB6fdO3B@cyberworld.ping.de>
>
>In article <6BXPB6fdO3B@cyberworld.ping.de>, Dirk Schnorpfeil
><schnorpf@cyberworld.ping.de> writes
>>I've got serious problems with the system command to start a unix command
>>out of a stored procedure, because i ever get the error message
>>
>>"668:system command cannot be executed
>> 1:not owner"
>>
>>I tried using different shells (sh and csh) and prooved all environment-
>>variables as PATH, DBTEMP, SHELL, etc...
>>
>>Any ideas???
>
> You will normally find ls in /bin/ls and it is executable by everyone
>so try running that! Also try that as Informix in case you do not have
>execute permissions on the stored procedure.
>--
>David Williams
I was meet with this problem.
Yes, you must have execute permissions on the stored procedure, at first,
but you have permissions already: procedure was executed and returns
"Error 668". Secondly, you must have permissions into UNIX for execute your
SYSTEM command. I hope following simple method helps you:
CREATE PROCEDURE tst( param VARCHAR(60) )
SYSTEM param; END PROCEDURE;
then: $ md $INFORMIXDIR/tst
$ chmod 777 $INFORMIXDIR/tst
execute procedure tst( 'l' ); -OK
execute procedure tst( 'l >$INFORMIXDIR/tst/l.out' ); -if OK, then:
execute procedure tst( 'pwd >$INFORMIXDIR/tst/pwd.out' );
execute procedure tst( 'id >$INFORMIXDIR/tst/id.out' );
execute procedure tst( 'set >$INFORMIXDIR/tst/set.out' );
and check *.out files.
Note: you must start database server (we use OnLine 6.00) when
current dir is $INFORMIXDIR, because ptty session from SP will opens for
this current dir as "/".
Julian Zalutsky,
Brest, Republic of Belarus.
E-mail: julian@martcom.belpak.brest.by