POSC Specifications
Version 2.2
Getting Started
Set Up the Environment

Setting Up the Environment

This document deals with the software for the DAE sample implementation only.

In order to use the POSC Epicentre sample implementation, it is necessary to set up the environment. This includes having

The steps to do this are given below.

Assumptions for this document

This document assumes you are operating from a Unix machine, with a license for a commercial database. You may also work from a PC with Windows 95 or Windows NT. At this time, POSC has implementations of Epicentre on Informix, Oracle, and Sybase databases.

Users of UNIX should have gnu make, gcc, and gnuzip, provided in /Files/GNU directory.

User of Windows 95/WinNT should have Visual C++ v4.0 or above.

Where to Start: Install

First select a root directory for the sample implementation.

POSC has a root directory named /posc_root. For purposes of illustration, assume that this is the name of the root directory. Any name, of course, will be sufficient.

Next, find the install directory in /Files/SourceCode/CompatLayer directory. The README file there gives installation instructions.

Perform the install. The install operations will build the file structure and will install all the necessary source code and data for the sample implementation. Note that this has not built the database. This is only the source data and file structure.

File Structure

The file structure created by the system install should not be changed. At the highest level, it is as follows:

/posc_root
   /system
   /pds_root
   /env_scripts

The 'system' subdirectory contains the sample implementation software. The 'pds_root' subdirectory will contain the data and the database information. The 'env_scripts' subdirectory will contain the scripts that will set up the environment variables for the database of choice.

Environment Variables

The next step is to set up the environment variables. This will be done using the script, setup_env.xxx (where xxx refers to csh for the c shell or sh for the bourne shell) which is in the root directory.

Before that can be done, though, the database has to exist. In particular, when the setup_env.xxx script is run, it will prompt for the database type, the database name, the database user, and the database password. It is the job of the database administrator to set up the database and to pass this information to the user.

Guidelines for the database administrator are given in a pds_root README file that is found in /posc_root/pds_root.

Given the correct information, you should now run setup_env.xxx. Following is a sample run. The inputs to the prompts will be explained below.

21 sun% setup_env.csh
/posc_root
Please enter your output script name (0=exit) :
inposc1
POSC_DBTYPE variable represents the database type. 
Currently oracle, sybase and informix are supported. 
Please enter your POSC_DBTYPE (0=exit, default=oracle, informix, oracle, sybase) :
informix
POSC_DBNAME variable represents the database name. 
In oracle, it's the ORACLE_SID.
Please enter your POSC_DBNAME (0=exit, default=posc, posc2, ...) :
epicentre
POSC_DBUSER variable represents the database user 
account name by which the user logons the database.
Please enter your POSC_DBUSER (0=exit, , ...) :
db1
POSC_DBPASSWD variable represents the password 
for the database user account.
Please enter your POSC_DBPASSWD (0=exit) :
db1
22 sun% 

Here is an explanation of the variables:

The output file, inposc1.csh, can be viewed.

Now that the set up environment file is built, it can be used to set the environment variables. Do the following steps: From the root directory, cd to env_scripts, and then source the script file that was created.

cd env_scripts
source inposc1.csh

The environment variables that were set up can be viewed in the pds_root README file.

Compile and link the sample implementation software

After the environment variables are set as described above, you should compile and link the implementation software. If you do not, the database will not load, since it uses this software to load the reference data and standard values data.

The steps are given in the README file in /posc_root/system/v2.2. The steps are

  cd $POSC_BUILD
  make clean   /* Not necessary the first time */
  make
as is defined in the README file. See the Steps in the README file for more detail on what is needed and what might go wrong.

What Next

The database is set up, but it has nothing in it. There are no tables and no data. The next step is to create the tables and load (at least) the standard values into the tables. These steps are covered in the next section: Populate Database.

[Return to Getting Started Introduction]


Last Modified 03 Sept 1997
© Copyright 1997 POSC. All rights reserved.