Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Informix Topics / June 2007

Tip: Looking for answers? Try searching our database.

SQL error = -668 ISAM error = -127

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
slawek_k - 27 Jun 2007 12:17 GMT
Hello everyone,

I receive this error if I call my in ESQL-C written program from any
SPL-procedure with the command "system(/path_to_my_program/
my_program)".
The program works fine if I call it from command line.
IDS can find all notify libraries to run this program because  the
LD_LIBRARY_PATH is set correctly.
I have test and change my_program into any OS-command for example
"ls" . It is works correctly.

In the next test I have written my_program with only main function and
without calls of database etc. Thus it don't work on the database but
it is compiled with INFORMIX-ESQLC libraries. It is don't work!

My question:
is it not allowed to call any ESQLC-program  from SPL procedure ???
Why ?

My enviroment:
IDS 9.40
Suse Linux 8.2
scottishpoet - 27 Jun 2007 13:56 GMT
> Hello everyone,
>
[quoted text clipped - 18 lines]
> IDS 9.40
> Suse Linux 8.2

Your ESQL / C program has no environemnt to run in when called direclt
from SPL

You need a script that sets the environment - PATH, Informixserver,
informixdir , library path etc and then runs the program

call the script from your SPL procedure
slawek_k - 28 Jun 2007 09:05 GMT
> > Hello everyone,
>
[quoted text clipped - 26 lines]
>
> call the script from your SPL procedure

Hello scottishpoet,

in my last test from yesterday I call my program and the program is
only the main function without access to any database.
Thus program don't need any environment to database.
But I want to adopt your proposal and today I start my program from a
script with settings of
INFORMIXSERVER,DBSERVERNAME, INFORMIXDIR, LD_LIBRARY_PATH
and it is not work. I receive the same error !

Slawek

It isn't works
Art S. Kagel - 28 Jun 2007 16:49 GMT
> > > Hello everyone,
>
[quoted text clipped - 40 lines]
>
> It isn't works

Where does the program reside?  Is it on the server's host machine or
a separate client machine?

IDS's SYSTEM command can only run tasks/scripts that reside on the
server's host.  Also, the execution privileges of the file must
include user 'informix'.

Art S. Kagel
slawek_k - 29 Jun 2007 10:57 GMT
> > > > Hello everyone,
>
[quoted text clipped - 49 lines]
>
> Art S. Kagel

Program reside on the IDS-SERVER. It is called with full absolute path
and hat 755 permissions.

Slawek
Everett Mills - 29 Jun 2007 14:37 GMT
Slawek-
    As the poet said, when spl executes a system program, the
executed program has no environment by default.  Try running a script
that sets your environment and executes your program instead.  Maybe
something like this:

cd my_path_name_here

# Set environment for the database
   export INFORMIXDIR=/usr/informix
   export PATH=$PATH:$INFORMIXDIR/bin
   export TERMCAP=/usr/informix/etc/termcap
   export DBDATE=MDY2
   export LD_LIBRARY_PATH=/usr/informix/lib:/usr/informix/lib/esql:
   export DBCENTURY=C
   export ONCONFIG=onconfig
   export INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhosts
   export INFORMIXSERVER=my_server

   my_program_name_here

You will have to modify this to match your $INFORMIXDIR, etc.

                --EEM

> -----Original Message-----
> From: informix-list-bounces@iiug.org [mailto:informix-list-
[quoted text clipped - 71 lines]
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
Jonathan Leffler - 30 Jun 2007 07:52 GMT
>     As the poet said, when spl executes a system program, the
> executed program has no environment by default.

Not quite true - it has the environment of IDS (the oninit process),
with some values taken from the client (but not all of them).

> Try running a script
> that sets your environment and executes your program instead.  Maybe
[quoted text clipped - 16 lines]
>
> You will have to modify this to match your $INFORMIXDIR, etc.

Despite my initial comment, this is sound advice.

For whatever it is worth, I run IDS with an extremely tightly controlled
environment.  By the time programs are run I get the following output:

Black JL: sqlcmd -d stores
SQL[1729]: create procedure sys(i integer default 0);
         > system "environ >/tmp/environ.out";
         > end procedure;
SQL[1730]: execute procedure sys(1);
SQL[1731]: bye;
Black JL: cd /tmp
Black JL: more environ.out
Date:      Fri Jun 29 23:37:08 PDT 2007
Machine:   black (SunOS 5.10)
User:      uid=9508(jleffler) gid=1240(RD)
groups=54324(dbaao),54325(dbsso),54326(dbsa),8714(ccusers),1260(SA)
Directory: /work1/jleffler
Umask:     07
Terminal:  not a tty

Limits (soft:hard):
coredump(blocks)         unlimited:unlimited
data(kbytes)             unlimited:unlimited
file(blocks)             unlimited:unlimited
nofiles(descriptors)           256:256
stack(kbytes)                 8192:unlimited
time(seconds)            unlimited:unlimited
vmemory(kbytes)          unlimited:unlimited

Environment:
CLIENT_LOCALE=en_US.8859-1
DBDATE=Y4MD-
DBMONEY=$.
DBPATH=//black_11
DBTEMP=/tmp
INFORMIXDIR=/usr/informix/10.00.UC5
INFORMIXSERVER=black_11
LC_COLLATE=en_US.819
LC_CTYPE=en_US.819
LC_MONETARY=en_US.819
LC_NUMERIC=en_US.819
LC_TIME=en_US.819
ONCONFIG=onconfig.black_11
PATH=.:/work1/jleffler/bin:/u/jleffler/bin:/usr/informix/10.00.UC5/bin:/u/jleffler/solaris/bin:/usr/
openssl/v0.9.7/bin:/usr/informix/9.40.UC7/bin:/usr/gnu/bin:/usr/atria/bin:/usr/perl/v5.8.8/bin:/usr/
bin:/usr/python/v2.5/bin:/usr/gdb/v6.2.1/bin:/usr/gnupg/v1.2.6/bin:/usr/gcc/v4.2.0/bin:/usr/tcl/v8.4
.11/bin:/workshop/Studio11/SUNWspro/bin:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin:/usr/local/bin:/us
r/sbin:/sbin
PWD=/work1/jleffler
SERVER_LOCALE=en_US.819
SHELL=/usr/bin/ksh
SQLPID=192311320
TZ=US/Pacific
_=/usr/gnu/bin/env
Black JL: asroot -- onstat -g env

IBM Informix Dynamic Server Version 10.00.UC5     -- On-Line -- Up 28
days 04:17:06 -- 31744 Kbytes

Server start-up environment:

Variable            Value [values-list]
DBDELIMITER         |
DBPATH              .
DBPRINT             lp -s
DBTEMP              /tmp
IFX_LISTEN_TIMEOUT  3
INFORMIXCONCSMCFG   /usr/informix/10.00.UC5/etc/concsm.black_11
INFORMIXDIR         /usr/informix/10.00.UC5
                    [/usr/informix/10.00.UC5]
                    [/usr/informix]
INFORMIXSERVER      black_11
INFORMIXTERM        termcap
LC_COLLATE          en_US.819
LC_CTYPE            en_US.819
LC_MONETARY         en_US.819
LC_NUMERIC          en_US.819
LC_TIME             en_US.819
LKNOTIFY            yes
LOCKDOWN            no
NODEFDAC            no
ONCONFIG            onconfig.black_11
PATH                /usr/bin:/usr/informix/10.00.UC5/bin
SERVER_LOCALE       en_US.819
SHELL               /usr/bin/ksh
TERM                dumb
TERMCAP             /etc/termcap
TZ                  UTC0

Of the variables listed in the 'onstat -g env' output, I set:
  IFX_LISTEN_TIMEOUT
  INFORMIXDIR
  INFORMIXSERVER
  ONCONFIG
  PATH
  SHELL
  TZ
(and HOME, which is the same as $INFORMIXDIR; the current directory of
the server is also $INFORMIXDIR, even though the system statement had
switched directory to /work1/jleffler, which is the value of $HOME - and
not the same as ~jleffler, the home directory in /etc/passwd).  The
other variables are set by IDS.

Signature

Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2007.0226 -- http://dbi.perl.org/

slawek_k - 30 Jun 2007 12:58 GMT
> >    As the poet said, when spl executes a system program, the
> > executed program has no environment by default.
[quoted text clipped - 131 lines]
> Email: jleff...@earthlink.net, jleff...@us.ibm.com
> Guardian of DBD::Informix v2007.0226 --http://dbi.perl.org/

Hello,

the problem is solved !
I made two errors.
The first: I have assumed that when the IDS started read the .profile
in its $HOME und set the LD_LIBRARY_PATH correctly.But it doesn't set
environment from
user informix. Followed  environment from my IDS
SERVER_LOCALE=en_US.819
SQLPID=1912143896
DBPATH=.
SHELL=/bin/bash
INFORMIXDIR=/home/informix
CLIENT_LOCALE=de_de.8859-1
DBCENTURY=C
DBMONEY=,EUR
ONCONFIG=onconfig
DBDATE=dmy4.
TBCONFIG=onconfig
PATH=/home/informix:/home/informix/bin:/home/bank_tr/sh:.:/home/
bank_tr/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/
opt/gnome2/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/jre/bin:/opt/
gnome/bin
PWD=/home/bank_tr
DB_LOCALE=de_de.8859-1
SHLVL=1
INFORMIXSERVER=idsmars
DBTEMP=/tmp
INFORMIXSQLHOSTS=/home/informix/etc/sqlhosts

No LD_LIBRARY_PATH in environment ! So I follow your suggestion and
started my program from the script but at the same time I made

second error and set INFORMIXDIR to /opt/informix instead to /home/
informix
After I set the correct INFORMIXDIR the program is running !

Thank you for your help!
Slawek
Jonathan Leffler - 30 Jun 2007 07:32 GMT
>>> I receive this error if I call my in ESQL-C written program from any
>>> SPL-procedure with the command "system(/path_to_my_program/
[quoted text clipped - 30 lines]
> INFORMIXSERVER,DBSERVERNAME, INFORMIXDIR, LD_LIBRARY_PATH
> and it is not work. I receive the same error !

I think a Google search (in groups.google.com and this news group) for
the subject '(ancient history) 668: System command cannot be executed,
255: Not in transaction' will reveal what is happening - the problem is
the exit status of the program.  You could probably use alternative
(shorter) searches too - like 'ancient 668'.

It is still possible that you have a real problem, but you should
certainly take a look and see whether that helps you.

If it does not help, then arrange to run whatever program you are using
via a shell script that logs the environment to a file.

Signature

Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2007.0226 -- http://dbi.perl.org/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.