Tom,
You can either write wrappers for the API's or you can use something else. Data Areas come to mind as that something else. Putting that info in a file is another option.
Matt
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Armbruster, Tom
Sent: Wednesday, February 13, 2008 5:18 PM
To: RPG programming on the AS400 / iSeries
Subject: Environment Variables in RPGLE
I'm in the process of designing a multi-customer system on a single box
which will segregate data to separate libraries based on the customers'
unique settings. In other words, there is global functionality and data
that is common to all users, and there is customer specific data that
should not be accessible by other users. Rather than duplicate the
common functions to each unique customer library, I want to have a
common ground for the core of the program, and only differentiate
between customer specific data which will reside in a unique customer
library. Since the data file structures in question will be consistent
across the various libraries, I believe the programs will be indifferent
to the location of the physical and logical files in question. PLEASE
let me know if this is not the case, else the remainder of my query is
moot.
The overall plan is to establish library lists and environment variables
for each unique customer database via CL. Before you suggest it, I am
fully aware that this can be accomplished via DB2 SQL and pure ILE.
However, time is of the essence and many of our expert resources are
most comfortable with programming in an RPG/RPGLE environment, which
precludes the desire to define the environment without keyed file
structures.
I've reviewed the APIs for environment variables in CL which allow for
additions, changes and removals. All of the documentation that I've
come across states that querying the value of a specific environment
variable needs to be prototyped as an external call to either getenv()
or Qp0zGetEnv(). Is this really the case, or is there a CL method of
retrieving the value of a specific environment variable? Some of the
common methods in place will record the specific data library. I'd like
to know if this is possible without duplicating and supporting common
functionality across multiple libraries.
Thanks,
Tom Armbruster
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.