Re: Error executing remote system command on an AIX Informix database from an NT Informix Server
Posted in 2004
Have you tryed it on aix itself?? does that work?? try: SYSTEM "(/usr/bin/ksh /usr/bin/env 2>&1) > /tmp/nonexistingfile"; -- check what is in nonexistingfile or SYSTEM "(/usr/bin/ksh /usr/bin/env 2>&1) > /dev/null"; Superboer. nick_lomax@uk.ibm.com (Nick Lomax) wrote in message news:<33951daa.0410200602.4eb541ee@posting.google.com>... > Dear All, > > I realise there are many queries and answers already posted on a > similar topic, but none seem to be able to get this working. > > I have two informix servers, one on Windows NT and one on AIX 4.3. > > Informix NT (7.31) > Informix AIX (7.xx) > > I have a stored procedure on the unix box with a system command > > SYSTEM '/usr/bin/ksh /usr/bin/env > /tmp/mylog' > > I have set up the trust, so that I can connect to the AIX instance as > informix from the NT server. > > I connect from the NT server to the AIX instance as informix and > execute the procedure. > > I get the following error - 668 Command cannot be executed > 127 No Primary Key > > I think that the 127 error number is from the shell execution. The > /tmp/mylog file is created but with no values. Even if I replace it > with an echo hello command I get an empty file. > > Having read one of Jonathan Leffler's responses, the SHELL environment > variables needs to be set to the the Shell of the remote system. > > In my case that is 'set SHELL=/usr/bin/ksh' . I did this and it still > didn't work. > > Am I missing further environment variables as I am executing the > procedure from NT. Has anyone managed to do this? > > Many thanks in advance, > > Nick