SYSTEM call command failed from store procedure
Posted in 2010
Topics: Stored Procedures & SPL, Versions, Editions & End-of-Life
Hi
I need some help from expert.
I'm running IBM Informix 11.50.FC4 on RHEL 5.3 OS platform.
I'm using the same procedure as what I ran in IDS 9.4. But when I ran in IDS
11, it gave me the error :
668: The system command cannot be executed or it exited with a non-zero status.
Following is my simple test sql:
create procedure test()DEFINE p_msg CHAR(160) ;
LET p_msg = 'ls ./*.sql >> /tmp/ifxdebug3.txt ';
system p_msg;
RETURN;
end procedure;
By doing;
execute procedure test(); end procedure ; I got the above error messages.
Appreciate some advice.
Thanks
Try hard coding the path to ls and the *.sql files - it will be the
environment.
What is the session environment when it is running
Cheers
Paul
> Hi
>
> I need some help from expert.
>
> I'm running IBM Informix 11.50.FC4 on RHEL 5.3 OS platform.
>
> I'm using the same procedure as what I ran in IDS 9.4. But when I ran in
> IDS
> 11, it gave me the error :
>
> 668: The system command cannot be executed or it exited with a non-zero
> status.>
> Following is my simple test sql:
>
> create procedure test()> DEFINE p_msg CHAR(160) ;
>
> LET p_msg = 'ls ./*.sql >> /tmp/ifxdebug3.txt ';
>
> system p_msg;
> RETURN;
> end procedure;
>
> By doing;
> execute procedure test(); end procedure ; I got the above error messages.>
> Appreciate some advice.
>
> Thanks
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
--
Paul Watson
Tel: +1 913-674-0360
Mob: +1 913-387-7529
Web: www.oninit.com
www.advancedatatools.com
Failure is not as frightening as regret.
If you want to improve, be content to be thought foolish and stupid.
Thanks Paul
The following was the environment for the user id i used:
[informix@demo miewrk]$ env
HOSTNAME=demo.perbadananabc.gov.my
TERM=vt220
SHELL=/bin/bash
HISTSIZE=1000
KDE_NO_IPV6=1
SSH_CLIENT=192.168.2.199 2642 22
INFORMIXDIR=/opt/informixQTDIR=/usr/lib64/qt-3.3
OLDPWD=/home/informix
QTINC=/usr/lib64/qt-3.3/include
SSH_TTY=/dev/pts/5
USER=informix
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;0
1:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.b
tm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:
*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*
.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;3
5:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
KDEDIR=/usr
ONCONFIG=onconfig.saga
DBDATE=DMY4/MAIL=/var/spool/mail/informix
PATH=/opt/informix/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/informix/bin
INPUTRC=/etc/inputrc
PWD=/opt/informix/work/miewrk
LANG=en_US.UTF-8
KDE_IS_PRELINKED=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
INFORMIXSERVER=ol_sagaSHLVL=1
HOME=/home/informix
LOGNAME=informix
QTLIB=/usr/lib64/qt-3.3/lib
CVS_RSH=ssh
SSH_CONNECTION=192.168.2.199 2642 192.168.2.250 22
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env