Re: Accessing Environment Variables within a strored proc.
Posted in 1998
Topics: Stored Procedures & SPL, Networking & sqlhosts Configuration
Jon Myatt wrote: > > And the environment handed to the program run by the 'system' call > > will not be the same as that of the user. > > Why is this? > > I've noticed that the environment a system call from SPL gets seems > to be a small subset of some environment or other - I can't figure > out why some vars get passed and some dont. Where is this environment > inherited from? Where should I set an env. var so that it is > available in the environment to a system call from a stored procedure? > It should be the same as the /etc/profile environment but I'm happy to flamed about that. The problem is the system call does not source your ./profile. I usually have a file, typically std.env, which is always without exception used to set the environment. BTW I don't call executables directly, again there are always run from a script. Not the most efficient way I know but it does make debugging and monitoring a lot easier. From what I remember isn't there a informix.rc file both systemwide and per user that is sourced on inbound network connections and can be used to ensure the environment. -- Paul Watson # WF Software Ltd # I don't suffer from stress - Tel: +44 1436 674729 # I'm a carrier. Fax: +44 1436 678693 # www.wfsoftware.co.uk #