RE: Problem running a 4GL program with an stored procedure
Posted in 2008
Topics: Stored Procedures & SPL, Connectivity: ODBC / JDBC / .NET, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Platform-Specific Issues
> -----Original Message-----
> From: informix-list-bounces@iiug.org [mailto:informix-list-
> bounces@iiug.org] On Behalf Of roger.camargo@gmail.com
> Sent: Friday, May 23, 2008 6:45 AM
> To: informix-list@iiug.org
> Subject: Re: Problem running a 4GL program with an stored procedure
>
> On 23 mayo, 09:32, "roger.cama...@gmail.com" <roger.cama...@gmail.com>
> wrote:
> > On 23 mayo, 06:44, scottishpoet <drybur...@yahoo.com> wrote:
> >
> >
> >
> >
> >
> > > On May 22, 5:41 am, "Paul Watson (Oninit)" <p...@oninit.com> wrote:
> >
> > > > roger.cama...@gmail.com wrote:
> > > > > We had a system that used STORED PROCEDURES(Launched via an
> ODBC
> > > > > connection) to execute 4GL programs that generate TXT files
> (data
> > > > > delimited with "|") that were loaded then into another program.
> >
> > > > > We have migrated to the new INFORMIX 11.50 and when we try to
> run the
> > > > > stored procedures there is an error produced:
> >
> > > > > Error: The system command cannot be executed or it exited with
> a non-
> > > > > zero status. (State:S1000, Native Code: FFFFFD64)
> >
> > > > > The stored procedure that we create is:
> >
> > > > > CREATE PROCEDURE test()> > > > > SYSTEM 'fglgo /disco2/bexe/sgfreversiones.4gi';
> > > > > END PROCEDURE;
> >
> > > > > And we execute it:
> > > > > EXECUTE PROCEDURE test();> >
> > > > > Information on our previous system:
> > > > > INFORMIX 9.4 running on a Sun SOLARIS
> >
> > > > > and now:
> > > > > INFORMIX 11.50 running on Linux RED HAT
> >
> > > > > Any hints and help would be appreciated
> >
> > > > This is probably the environment
> >
> > > > Drop the fglgo line into a script and run the script. Within the
> script
> > > > you can set a 'good' environment or just add a 'set -x' to see
> the errors
> >
> > > > Cheers
> > > > Paul- Hide quoted text -
> >
> > > > - Show quoted text -
> >
> > > As Paul says this is likely environemnt related
> >
> > > the fglgo needs to know INFIRMIXDIR etc of the rds software
> >
> > > replace the fglgo in the stored procedure with a script and in the
> > > script set the appropriate environment variables prior to running
> the
> > > fglgo statement
> >
> > > You may want to export the stored procedure from the "old" system
> as
> > > this would have had to implement a similar solution- Ocultar texto
> de la cita -
> >
> > > - Mostrar texto de la cita -
> >
> > As scottishpoet suggested it is the exported one from the "old"
> system
> > that is currently executed.
> >
> > To know if the enviroment was the correct I made this SP :
> >
> > CREATE PROCEDURE sgftest()> > SYSTEM 'echo $INFORMIXDIR > informixdir.txt';
> > SYSTEM 'echo $INFORMIXSERVER > informixserver.txt';
> > SYSTEM 'echo $ONCONFIG > onconfig.txt';
> > END PROCEDURE;
> >
> > and when I executed I checked the files generated and they had the
> > correct values, that shows that the enviroment is correct.
> >
> > Now I'll try to make an script and then execute this script with an
> > SP, but I'm afraid that the result will be the same, the script would
> > be like this:
> >
> > test.sh
> > #!/bin/sh
> > export INFORMIXDIR=/home/informix
> > export INFORMIXSERVER=segunda
> > export ONCONFIG=onconfig.segunda> > fglgo /disco2/bexe/roger/sgfreversiones.4gi
> >
> > then I'll create an SP
> >
> > CREATE PROCEDURE test()> > SYSTEM 'sh test.sh;
> > END PROCEDURE;
> >
> > This would be correct or I need to modify my script, maybe add
> > something more or delete something?
> >
> > Thanks for your help.- Ocultar texto de la cita -
> >
> > - Mostrar texto de la cita -
>
> I did exactly as I said in the previous entry and the same error
> message happened when I executed the SP.
>
> Error: The system command cannot be executed or it exited with a non-
> zero status. (State:S1000, Native Code: FFFFFD64)
>
> Executing the script directly from command line works as expected.
>
<< snipped >>
Did you add $INFORMIXDIR/bin to the PATH environment within the script?
HTH,
Paul M.
Its been a while, as well as PATH you may also need LD_LIBRARY_PATH (or whatever the rquivalent is on your OS) You need it for 4Gl, not so sure about RDS
On 28 mei, 11:46, scottishpoet <drybur...@yahoo.com> wrote:
> Its been a while, as well as PATH you may also need LD_LIBRARY_PATH
> (or whatever the rquivalent is on your OS) You need it for 4Gl, not so
> sure about RDS
i would:
CREATE PROCEDURE test()SYSTEM '/realpath_to_yourscript/test.sh > /tmp/nonexistingfilemakesure
2>&1;
END PROCEDURE;
in /tmp/nonexistingfilemakesure there should be the real reason why it
fails.
Superboer.
way fast=http://www.clipjes.nl/clip/nederlands/n/normaal_-
_oerend_hard.html