Re: Informix SPL SYSTEM Command Question
Posted in 1996
Anisha, I am getting notifications from the HP mailers that email is not getting through after 4 hours, but they will keep on trying for 5 days, and the mail does get through some time later. This has affected emails I've sent to you and to other people within HP. I wonder if the power outage at the weekend upset something... } SYSTEM "fglgo script_name arg1 arg2 arg3 ..." I never run a program like that. I specify a path name (painful, but necessary in my book, to avoid the problems you are having), and the pathname is of a shell script that sets the correct environment. To find out what your trouble is, I'd modify the SP to run a test program: SYSTEM("{ echo;date;env; } >>/tmp/env.log"); on both systems -- this will tell us what the environments are for the commands run by the SPs. They'll be radically different, I think -- one is more or less complete and has INFORMIXDIR set and PATH contains $INFORMIXDIR/bin, and the other doesn't. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }From: ANISHA_VASWANI@HP-SanJose-om1.om.hp.com }Date: Thu, 15 Aug 96 10:02:32 -0700 } } First of all, thanks to everyone who responded to my question. But, it } still doesn't work :( } } Several of you suggested to check the permissions on this file -- they } seem to be set correctly. The file has the follwing permissions: } -rwxr-xr-x } In other words, it is readable and executable by all. I called } informix tech support and they suggested that I change the group to } informix from users and this didn't help either. I also make sure that } I'm in the right directory by doing another SYSTEM command that does a } cd using absolute pathnames before I call the shell script. } } Jonathan, } } You and I suspect the same thing that something critical has changed } in the environment -- BUT WHAT?!? On first pass, the environments on } the test and production systems appear to be similar. Do you have any } pointers on where or what I should look for? } } Still frustrated, } } Anisha } anisha_vaswani@hp.com }______________________________ Reply Separator _________________________________ }Subject: Informix SPL SYSTEM Command Question }HP-Boise,shargw4 }Date: 8/14/96 2:28 PM } }Item Subject: cc:Mail Text } } Hi Informix Gurus, } } I'm struggling with the following problem and any tips would be } greatly appreciated: } } Environment } =========== } } OS: HP UX 10.X } Informix Online Version: 7.12.UC1 } Informix 4GL Version: 6.02.UD1 } } Problem } ======= } I have a stored procedure that uses the SYSTEM Command to call a shell } script which eventually calls a 4GL script. The problem is that this } is not working anymore. I keep getting SQL Error -668 which is that a } SYSTEM Command failed. The reason I said anymore is that it used to } work before and it just stopped working and I'm not sure why. It gets } even crazier -- I have the exact same setup on the test system and it } works fine over there! } } So to find out what the problem was, I created a simple stored } procedure that calls a shell script using the SYSTEM Command and all } this shell script does, is echo a string to a debug file. This does } not work! However, if I do the echo to the debug file directly from } the stored procedure, it works just fine. I also tried the following: } SYSTEM "fglgo script_name arg1 arg2 arg3 ..." } } i.e. execute the 4GL script directly from the stored procedure } This also gives me the -668 error. } } Anyone have any explanations for this behaviour? Also, is anyone aware } of any environment variables or issues that might be relevant? I ask } this because the darn thing runs on one system with the identical } setup and not that other! } } Extremely frustrated, } Anisha } anisha_vaswani@hp.com }