[Info-Ingres] getenv, NMgtAtt and OME

Grant Croker grant.croker at ingres.com
Tue May 8 05:12:36 CDT 2007


Hi Martin,

It's all about context - your OME function is being called from the 
server and will only see what the server can see or saw when it started 
up. The front-end terminal applications like tm, abf etc. also make 
calls to NMgtAt to determine II_DATE_FORMAT etc. The values fetched in 
those applications return the environment values of the context of the 
user process at the time the process was started, be they defined in the 
shell or in symbol.tbl.

To do what you want would require changes to a lot more than just OME.

regards

grant

On 08/05/07 11:08, martin.bowes at ctsu.ox.ac.uk scribbled:
> Hi Everyone,
>
> I'm trying to make an OME function that will use a user environment 
> variable - just like how normal (ie. sane) Ingres can look for user 
> environment variables such as II_DATE_FORMAT etc...
>
> I thought a simple setting of getenv() would do the trick. It doesn't work 
> as expected. To be available to the the program, the environment 
> variable must be set by the ingres session that started the installation - 
> and only if the variable was set at the time the installation was started.
>
> So I decide to check in the Opensource to see how Ingres does it. In 
> there I stumbled across the NMgtAt() function. It seemed to do not 
> much more than what I had tried to do with getenv(), but what the hell, I 
> thought I'll give it a whirl. The OME functions compiled okay, linked 
> okay and lo and behold acted in exactly the same manner as the 
> getenv() version.
>
> So does anyone have any idea why I cant get the damn thing to check 
> the user environment space at run time - why is it always the ingres 
> users space and from the environment that started the installation?
>
> Martin Bowes
> _______________________________________________
> Info-Ingres mailing list
> Info-Ingres at kettleriverconsulting.com
> http://www.kettleriverconsulting.com/mailman/listinfo/info-ingres
>   


-- 
Grant Croker, grantc at php.net   
Software Engineer, Ingres - http://ingres.com 
tel: +44 (0)1753 559505 UK / +34 676 518209 Espan~a
--
SLUBBERY (n.)
The gooey drips of wax that dribble down the sides of a candle so beloved by Italian restaurants with Chianti bottles instead of wallpaper.



More information about the Info-Ingres mailing list