Re: Stored Procedure questions
Posted in 1998
In article <6tohdp$vhd$1@nnrp1.dejanews.com>, robin_cyrus@notes.pw.com wrote: > Is it possible to access/pick-up pre-set environment variables(set and > exported from .profile or a shell script) from inside a SP (stored Procedure) > ? > > -----== Posted via Deja News, The Leader in Internet Discussion ==----- > http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum > I've never thought about this, but here is my educated guess. No, there is no way to retrieve values from the environment of a client process that has made a request of the database server to execute a stored procedure, which will be invoked via a complete unrelated process, a process that may even be on another machine. *But*, you can insert common values needed by clients in a database table, and a stored procedure certainly can access those values via a select. Just a note about UNIX environment variables. They are part of the user space of a process. These values can _only_ be passed to child processes. So, if you login and set an environment variable in your .profile, and then execute an Informix-4GL program, since the resulting process is a child of the login shell, the fgl_getenv() routine _can_ be used to retrieve an inherited value (such as PATH, HOME, INFORMIXDIR ...). *But*, you can insert common values needed by clients in a database table, and a stored procedure certainly can access those values via a select. -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum