ESSBASE: Using Environment Variables in an Essbase Calculation Script


In order to use environment variables in an Essbase calc script, the variables need to be set in the opmn.xml file and on Unix, at the operating system level.

Windows:

1. Create a directory where you want the exported file to go, for example D:\Data.

2. Add the environment variable to the /Oracle/Middleware/user_projects/epmsystem1/config/OPMN/opmn/opmn.xml file:

<variable id=”ENVFILE” value=”D:/Data/newexport.txt”/>

3. Stop/Start the Essbase service.

4. Test using the calc script taken from Essbase Database Administration Guide, run against Sample/Basic:

SET DATAEXPORTOPTIONS
{
DATAEXPORTLEVEL “ALL”;
DATAEXPORTOVERWRITEFILE ON;
};
FIX (“New York”, “100-10”);
DATAEXPORT “File” “,” $ENVFILE;
ENDFIX;

If the Sample applications were not installed, test using one of your databases.

 

UNIX:

1. Create a directory where you want the exported file to go, for example /u01/EPM/epmadmin/Data.

2. Add the environment variable to users login script, usually .bashrc or .profile, replacing with your pathing information:

ENVFILE=”/u01/EPM/epmadmin/Data/newexport.txt”
export ENVFILE

3. Add the environment variable to the /Oracle/Middleware/user_projects/epmsystem1/config/OPMN/opmn/opmn.xml:

<variable id=”ENVFILE” value=”/u01/EPM/epmadmin/Data/newexport.txt”/>

4. After making the changes, log out of the Unix system and log back in for the new environment variable to take effect.

5. Stop/start Essbase to load the opmn.xml changes.

6. Confirm the setting is correct at the Unix level:

echo $ENVFILE
/u01/EPM/epmadmin/Data/newexport.txt

7. Test using the calc script taken from Essbase Database Administration Guide, run against Sample/Basic:

SET DATAEXPORTOPTIONS
{
DATAEXPORTLEVEL “ALL”;
DATAEXPORTOVERWRITEFILE ON;
};
FIX (“New York”, “100-10”);
DATAEXPORT “File” “,” $ENVFILE;
ENDFIX;

If the Sample applications were not installed, test using one of your databases.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s