Re: Accessing Environment Variables within a strored proc.
Posted in 1998
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? Because it is the engine that is running the stored procedure not your application so it does not know about the applications environment. The engine knows a few of the environment variables in the client environment from the connection handshaking procedure but only those few that it is interested in like DBSPACETEMP, PDQPRIORITY, and the PSORT_* parameters and may pass these to the sub-shell but I'm not sure that the shell does not just get the server's own environment. Art S. Kagel