Re: Passing Variables from UNIX to I4GL
Posted in 2000
Correcto-mundo, exactly what I do, works very nicely. We even
allow people to switch between db's dynamically using this.
Conversion of our apps was simple, linked in one little 4gl function
to check the variable and switch accordingly.
1 line insert into our code, recompile. voila
brett
"Parker, Jack" wrote:
>
> Not so simple as it appears. Sure you can do an fgl_getenv("DBNAME") to
> return the variable, but you will also need to check all the DEFINE
> statements. Any "LIKE" statements are resolved at compile time - based on
> the database defined.
>
> have fun.
>
> cheers
> j.
>
> > -----Original Message-----
> > From: Adam [mailto:AMBirch@hotmail.com]
> > Sent: Wednesday, December 13, 2000 6:29 AM
> > To: informix-list@iiug.org
> > Subject: Passing Variables from UNIX to I4GL
> >
> >
> > Could someone with I4GL experiance please help with the
> > following problem:
> >
> > 1. same data base (different data) on 4 different servers
> > scattered around
> > the country.
> > 2. not enough money or trained people to manage all four
> > sites (same old
> > story)
> >
> > What I want to do is consolidate the four databases into the
> > one Informix
> > Instance, but still keep the seperate databases (until the data can be
> > migrated into the same database). My plan of attack was to
> > modify the 4gl
> > source code so that I could replace all the "database
> > dbname;" statments
> > with a "database UNIX_ENVIROMENT_VARIABLE;" statement that
> > way when the user
> > logs in the UNIX_ENVIROMENT_VARIABLE can be set in their
> > .profile and it
> > will point them at the right database. therefor enabiling me
> > to consolidate
> > on to the one instance.
> >
> > UNIX=AIX, SHELL=ksh
> > INFORMIX=7.31UC5> > RDS = 7.2?
> >
> > Adam Birch
> > AMBirch@hotmail.com
> >
> >
--
-----------------------------------------------------------------
Brett's 10th law of UNIX administration...
rm is forever
-----------------------------------------------------------------
Brett Geer - UNIX Admin/Analyst/Programmer - Intratex Holdings.
Tel. +27 31 717 4000 Direct. +27 31 717 4146
Fax. +27 31 717 4001
-----------------------------------------------------------------
The little voices are talking to me again, telling me to reach
for a keyboard and type rm -rf /*
last week they had me rm -rf `echo $MANPATH | sed 's/:/ /g'`
now I fear I have no answers
-----------------------------------------------------------------