Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> environment variables in PL/SQL

environment variables in PL/SQL

From: LR <lrako_at_hotmail.com>
Date: 19 Jul 2002 05:20:12 -0700
Message-ID: <dcc2db96.0207190420.671ee192@posting.google.com>


Hi Oracle gurus,

I do have a problem which should not be too difficult to solve. Maybe it is more related to Unix but I am not so proficient in Unix.

We are developing an application which is tested in different environments.
The application uses UTL_FILE to write flat files. The UTL_FILE_DIR parameter is in the following form:

/busdata/<DB_NAME>/<ENVIRONMENT>/interface/inbound

where DB_NAME stands for the database name and <ENVIRONMENT> is for example DEV, TEST, QA, EDU, PROD.

In addition, we are using a package, CONST_PKG, containing all constants with a variable

EDI_ROOT VARCHAR2(255) := '/busdata/<DB_NAME>/<ENVIRONMENT>

with hardcoded values for each environment. Which is a bad design, I acknowledge.

Now, how can we make this all dynamic ? I mean, if in UNIX, we do have environment variables $DB_NAME and $ENVIRONMENT, is there a way to dynamically compile the CONST_PKG, according to the values of $DB_NAME and $ENVIRONMENT ?

What any other options would you consider ?

Thanks and regards,

Lalaina RAKOTONIAINA
ERP Analyst Developer Received on Fri Jul 19 2002 - 07:20:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US