You are on page 1of 42

Using Batch & MaxL Scripts to Build a

Simple Data Utility


Introduction
Loading data to Essbase cubes can be done in many ways. Oracle provides a number of
applications that can perform this task. One of such tools is MaxL. Combining Maxl Scripts
with batch files can provide low cost, simple, and fully customizable solution to the task of
loading data into Essbase. In this post, I will give a detailed example of how to use a simple
DOS batch file to call a MaxL script that will clear and load data to five different Essbase
cubes.
The benefits of using MaxL to load data are:
1. Easy to debug.
2. Easy to maintain.
3. Easy to deploy.
4. Low cost.
5. Plenty of documentation and help available.
Building Batch and MaxL scripts can often provide quick solutions to complex problems.

The Data_Utility
The example I will use comes from an environment that had five separate ASO cubes. The
cubes had similar structure (same dimension names, same scenarios, same time and period
dimensions). The load rules used to load data into the cubes are the same in all the cubes.
They all use the same data files and load only the data that applies to each individual cube.
In this environment, I built a utility to clear and load data into the cubes. The utility included
two files:
1. bat
2. mxl

The complete text of both files is provided at the end of this post.

To use the utility, a user would launch the Data_Utility.bat file. This file asks the user to
respond to a number for simple questions:

Select the data to be loaded

Select the cube data is to be loaded into

Select the time period (year)

Confirm the selections

After the user would make appropriate responses, the batch file launches the MaxL script
which performs the following operations:

Spools actions to a log file

Clears data in the relevant intersections in the given cube

Loads data as specified by the user

Combining the Batch file and the MaxL script allows the end user to interact with Essbase
without going into the EAS. This allows the end user to perform administrative actions
without actually having access to administrative consol. In some organizations, this can be a
big win for both the end user and the admin staff.

Setting up the CMD Window

Before starting to interact with the user, it is a good idea to clean up the cmd window so that
the user only sees information that is pertinent to the task at hand. Long paths and other
commands lines can muck up the screen and make it hard for the user to make quick and easy
decisions. The following lines clear up the CMD window and set the path to the D: drive:

@echo off
cls
D:

This section sets up a date and time stamp. This can stamp can be used in log and error file
names for reference purposes.

rem
set
set
set

**** Set Time Stamp *****


DateStamp=%DATE:~4,2%%DATE:~7,2%%DATE:~10,4%
TimeStamp=%TIME:~0,2%%TIME:~3,2%
DateAndTime=%DateStamp%~%TimeStamp%

The echo command can be used to display information on the screen. In the following
example, it is used to define a title in the CMD window. This title is not necessary, but it
provides a context to for the user:

echo *********************************
echo ***** TopDown ASO Data Utility ******
echo *********************************

Interacting With the User

Next, display the first set of options for the user to choose from. In this case, the user can
choose the type of data to load. The options are Actuals, Budget, and Forecast. In this case,
the options are the same as the members of the Scenario dimension.

echo.
echo Please select the data you want to load:
echo.
echo A. Actuals
echo.
echo B. Budget
echo.
echo F. Forecast
echo.

The above section, combined with the title section before it will look like this:

The following line allows the user to respond to the question above by entering a keystroke.
In this case, the user can only respond with pressing one of the following keys: A, B, or
F:

choice /C:ABF /M "-->> Enter a letter for the data you want to clear and
load: "%1

After the user responds by pressing a valid key, the program performs a series of actions
depending on the users response.

IF ERRORLEVEL==3 GOTO IsForecast


IF ERRORLEVEL==2 GOTO IsBudget
IF ERRORLEVEL==1 GOTO IsActual

If the user pressed the A key, the software will set the DataType variable to Actual, and
the MTDRule variable to FY_MTD. The GoToCubSelection line skips the settings for Budget
and Forecast.

:IsActual
Set DataType=Actual
Set MTDRule=FY_MTD
GoTo CubeSeclection

If the user pressed the B key, the software will set the DataType variable to Budget, and
the MTDRule variable to FY_MTDB. The GoToCubSelection line skips the settings for
Forecast.

:IsBudget
Set DataType=Budget
Set MTDRule=FY_MTDB
GoTo CubeSeclection

If the user pressed the F key, the software will set the DataType variable to Forecast, and
the MTDRule variable to FY_MTDF. The GoToCubSelection line skips the settings for
Forecast.

:IsForecast
Set DataType=F1
Set MTDRule=FY_MTDF
GoTo CubeSeclection

The variables are used by the MaxL script to launch clear data (DataType). In this
application, Essbase uses different load rules for each data type. This makes it necessary to
set the variable MTDRule so that the MaxL script can use the proper load rule when loading
the data.

Another way to let the user pick options is to set the variables directly after ERRORLEVEL
check. In the following example, the code asks the user to pick a cube, and then sets the
variable CubeName to the appropriate name based on the users response:

:CubeSeclection
cls
echo.
echo Please select a cube:
echo.
echo X. ALL
echo.
echo A. AcctASI

echo.
echo C.
echo.
echo F.
echo.
echo G.
echo.
echo L.
echo.

AcctCON
AcctFDN
AcctGRP
AcctLCE

The above section will look like this:

The command to let the user pick the cube is the same command used in the previous
section:
choice /C:XACFGL /M >> Enter a letter for the cube you want to load: %2
However, since the script is only setting one variable, that section is much more simple than
the one used in the previous section:
IF
IF
IF
IF
IF
IF

ERRORLEVEL
ERRORLEVEL
ERRORLEVEL
ERRORLEVEL
ERRORLEVEL
ERRORLEVEL

==1
==2
==3
==4
==5
==6

Set
Set
Set
Set
Set
Set

CubeName=ALL
CubeName=AcctASI
CubeName=AcctCON
CubeName=AcctFDN
CubeName=AcctGRP
CubeName=AcctLCE

Note that in this case, the choice provided for the user response corresponds to the label of
each option in the display section (X for All, A for AcctASI, C for AcctCON,
etc). These are controlled by the /C: paramater of the choice command (choice
/C:XACFGL).

Using the cls command at the beginning of the section will clear the CMD window and
provide a clean new display for the user. Again, this will allow the script to present only the
information that is necessary for the user to process.

If the user selects all cubes (option X), the script sets the VerifyQ variable to ALL. For all
other response, the VerifyQ variable will be set to a string containing the application and
database name (in this application, they are both the same. This is done in the following line
of code:

IF %CubeName%==ALL (set VerifyQ=ALL) ELSE (Set VerifyQ=%CubeName%.%CubeName


%)

For example, if the user selects C, VerifyQ will be set to AcctCON.AcctCON.


The VerifyQ variable is not passed to MaxL. It is used to ask the user to verify the selection
made before it calls the MaxL script. It is also used for the script to skip the single cube
operations and go to the all cubes operation.This provides more flexibility in displaying
information to the user. It is not required, but it adds a touch customization to the script.

Verifying Action

After all the information is collected from the user, it is a good idea to ask the user to verify
the information collected before proceeding to the MaxL script. Using the echo command,
display the options the user selected up to this point:

:Verify
cls
echo *************************************
echo ***** TopDown ASO Data Utility ******
echo *************************************
echo.
echo Are you sure you want to clear and load data to:
echo.
echo Data Type: ... %DataType%
echo.
echo Applicaiton.Cube: ... %VerifyQ%
echo.
echo Year: ... %YearName%
echo.
echo MTD Rule Name:... ^%MTDRule%
echo.

This will look like this if the user selected the AcctCON cube:

This is how it will look if the user selected the All Cubes option:

The following section of the code asks the use to accept and continue entering Y, or reject
and abort by entering N.
CHOICE /M "-->> Enter Y to continue, or N to abort: "
if ERRORLEVEL==2 goto END

In this example, the log files are stored in the Logs folder, and the MaxL scripts are stored
in the Scripts folder. The first step is to change the working directory to the Logs folder:
D:
CD\Hyperion\Scripts\Logs

If the user selected to load data to all cubes, the script will jump to the LoadAll section of the
code. If not, it will continue to the next line of code:
IF %VerifyQ%==ALL GoTo LoadAll
Before calling the MaxL scripts, delete the log files for the cube that is being modified. This
is done by the following command:
Del Data_Utility~%CubeName%~%DataType%*.*

Calling the MaxL Scripts

At this point, the script calls the MaxL script that executes the operations in Essbase. To do
this, the working directory must be set to the folder that contains the MaxL script:

CD\Hyperion\Scripts\Scripts

Now the MaxL script Data_Utility.mxl can be called. This MaxL script uses the CubeName,
DataType, YearName and MTDRule variables. These variables were set using information
provided by the user as described in the above sections:

echo Load all data in %CubeName%


Call essmesh Data_Utility.mxl %CubeName% %DataType% %YearName% %MTDRule%
GoTo END

The GoTo END line skips the section of the code that loads data to all cubes (covered in the
following section.

As noted above, if the user elects to load data to all cubes, the MaxL script is called for each
cube. Each time the MaxL script is called, the variable for the cube name is modified. This
way, there is no need to maintain multiple scripts for each operation. This is how it is done:

First, delete all the log files:


:LoadAll
Del Data_Utility*.*
CD\Hyperion\ Scripts\Scripts
Next, call the MaxL script for each cube:
echo Load all data in %CubeName%
Call essmesh Data_Utility.mxl AcctASI %DataType%
Call essmesh Data_Utility.mxl AcctCON %DataType%
Call essmesh Data_Utility.mxl AcctFDN %DataType%
Call essmesh Data_Utility.mxl AcctGRP %DataType%
Call essmesh Data_Utility.mxl AcctLCE %DataType%

%YearName%
%YearName%
%YearName%
%YearName%
%YearName%

%MTDRule%
%MTDRule%
%MTDRule%
%MTDRule%
%MTDRule%

Note that the cube name is hardcoded each time the MaxL script is called instead of using the
CubeName variable.

The MaxL Script

The advantage of using the batch file to collect information from the user about the operation
to be performed is that the single batch file can call a single MaxL script. This makes it easier
for the administrator to maintain.

The first section of the MaxL script deals with setting the variables in the file. In this
example, all variables start with a lower case v. Some of the variables in the file are passed
on by the batch file:
/************Set Variables*******************/
Set vCube = $1;
Set vDataType = $2;
Set vMTDRule = $3;
Set vYearName = $4;
Other variables are hard coded into the MaxL Script:
Set vDataFolder = D:\\Hyperion\\AARPHyperion\\Data\\;
Set vLogFolder = D:\\Hyperion\\AARPHyperion\\AARP_Scripts\\Logs\\;

After the variables are set, turn on spooling to and send it to the log file. Note that the log file
is named by the vCube variable, which is passed on by the batch file:

/************Turn spooling on*******************/


Set message level all;
Set vLogFileName = "$vLogFolder\Data_Utility~$vCube~$vDataType.log";
echo vLogFileName is "$vLogFileName";
Spool on to "$vLogFileName";

Displaying the parameters can help debug the script:


/************Display Parameters*******************/
echo This script clears and loads data using the following parameters:;
echo Cube: "$vCube";
echo DataType: "$vDataType";
echo Year: "$vYearName";
echo MTD Rule: "$vMTDRule";
echo YTD Rule: "$vYTDRule";
echo Data Folder: "$vDataFolder";
echo Log Folder: "$vLogFolder";

Before starting any operation in Essbase, the script must login to the environment. This login
information can be encrypted using the MaxL encryption feature. In this example, no
encryption is used:

/****************Login**************************/
login "Admin" "Password123" on '10.158.128.72:1423';

After login, the script clears the section of the data provided by the users responses to in the
batch file:

/************ clear data ***************/


echo
***************************************************************************
**;
echo ****** Clear all "$vDataType" data in "$vCube" ******;
alter database "$vCube"."$vCube" clear data in region "{([$vDataType],
[$vYearName])}" physical;
echo
***************************************************************************
**;
echo ****** Clear complete ******;
echo ;

After clearing the section of the cube, the data loading starts. In this example, there is a
separate data file for current and prior year. The file names are constant and therefore they are
hardcoded into the MaxL script. These filenames could be set as variables that are provided
by the user just like the cube name and the data type.
/************ Load data ***************/
echo
***************************************************************************
**;

echo ****** Load "$vYearName" "$vDataType" data to "$vCube" using


"^$vMTDRule" Rule File ******;
Set vErrFileName =
"$vLogFolder\Data_Utility~$vCube~$vDataType~$vYearName.err";
goto "$vYearName";
define label 'CurYear';
Set vDataFileName = "$vDataFolder\ABF_GL2HYPERION.csv";
goto 'ShowDataFileName';
define label 'PriorYear';
Set vDataFileName = "$vDataFolder\ABF_GL2HYPERION$vYearName.csv";
define label 'ShowDataFileName';
echo Data File Name: "$vDataFileName";
echo Error File Name: "$vErrFileName";
import database "$vCube"."$vCube" data from local text data_file
"$vDataFileName" using server rules_file "^$vMTDRule" on error write to
"$vErrFileName";
echo
***************************************************************************
**;
echo ****** Load complete ******;
echo ;
After the data is loaded, the MaxL script logs out and exists the MaxL
schell.
/****************Logout and Exit**************/
logout;
exit;
spool off;

Data_Utility.bat

@echo off
cls
D:
rem **** Set Time Stamp *****
set DateStamp=%DATE:~4,2%%DATE:~7,2%%DATE:~10,4%
set TimeStamp=%TIME:~0,2%%TIME:~3,2%
set DateAndTime=%DateStamp%~%TimeStamp%
echo *************************************
echo ***** TopDown ASO Data Utility ******
echo *************************************
echo.
echo Please select the data you want to load:
echo.
echo A. Actuals
echo.
echo B. Budget
echo.
echo F. Forecast
echo.
choice /C:ABF /M "-->> Enter a letter for the data you want to clear and
load: "%1
IF ERRORLEVEL==3 GOTO IsForecast
IF ERRORLEVEL==2 GOTO IsBudget
IF ERRORLEVEL==1 GOTO IsActual
:IsActual
Set DataType=Actual
Set MTDRule=FY_MTD
Set YTDRule=FY_YTD
GoTo CubeSeclection
:IsBudget
Set DataType=Budget
Set MTDRule=FY_MTDB

Set YTDRule=FY_YTDB
GoTo CubeSeclection
:IsForecast
Set DataType=F1
Set MTDRule=FY_MTDF
Set YTDRule=FY_YTDF
GoTo CubeSeclection
:CubeSeclection
cls
echo.
echo Please select a cube:
echo.
echo X. ALL
echo.
echo A. AcctASI
echo.
echo C. AcctCON
echo.
echo F. AcctFDN
echo.
echo G. AcctGRP
echo.
echo L. AcctLCE
echo.
choice /C:XACFGL /M "-->> Enter a letter for the cube you want to load: "%2
IF ERRORLEVEL ==1 Set CubeName=ALL
IF ERRORLEVEL ==2 Set CubeName=AcctASI
IF ERRORLEVEL ==3 Set CubeName=AcctCON
IF ERRORLEVEL ==4 Set CubeName=AcctFDN
IF ERRORLEVEL ==5 Set CubeName=AcctGRP
IF ERRORLEVEL ==6 Set CubeName=AcctLCE
IF %CubeName%==ALL (set VerifyQ=ALL) ELSE (Set VerifyQ=%CubeName%.%CubeName
%)
:CubeSeclection
cls
echo.
echo Please select a Year:
echo.
echo.
echo C. Current Year
echo.
echo P. Prior Year
echo.
echo B. Both
echo.
choice /C:CPB /M "-->> Enter a letter for the year you want to load: "%3
IF ERRORLEVEL ==1 Set YearName=CurYear
IF ERRORLEVEL ==2 Set YearName=PriorYear
IF ERRORLEVEL ==3 Set YearName=Both
:Verify
cls
echo *************************************
echo ***** TopDown ASO Data Utility ******
echo *************************************
echo.
echo Are you sure you want to clear and load data to:
echo.
echo Data Type: .......... %DataType%
echo.
echo Applicaiton.Cube: ... %VerifyQ%
echo.

echo Year: ............... %YearName%


echo.
echo MTD Rule Name:....... ^%MTDRule%
echo.
:echo YTD Rule Name:...... ^%YTDRule%
echo.
CHOICE /M "-->> Enter Y to continue, or N to abort: "
if ERRORLEVEL==2 goto END
D:
CD\Hyperion\AARPHyperion\AARP_Scripts\Logs
IF %VerifyQ%==ALL GoTo LoadAll
Del Data_Utility~%CubeName%~%DataType%*.*
CD\Hyperion\AARPHyperion\AARP_Scripts\Scripts
echo Load all data in %CubeName%
Call startmaxl Data_Utility.mxl %CubeName% %DataType% %YearName% %MTDRule%
%YTDRule%
GoTo END
:LoadAll
Del Data_Utility*.*
CD\Hyperion\AARPHyperion\AARP_Scripts\Scripts
echo Load all data in %CubeName%
Call startmaxl Data_Utility.mxl AcctASI %DataType% %YearName% %MTDRule%
%YTDRule%
Call startmaxl Data_Utility.mxl AcctCON %DataType% %YearName% %MTDRule%
%YTDRule%
Call startmaxl Data_Utility.mxl AcctFDN %DataType% %YearName% %MTDRule%
%YTDRule%
Call startmaxl Data_Utility.mxl AcctGRP %DataType% %YearName% %MTDRule%
%YTDRule%
Call startmaxl Data_Utility.mxl AcctLCE %DataType% %YearName% %MTDRule%
%YTDRule%
:END
set CubeName=
Set YearName=
Set MonthName=
Set MonthNameDisplay=
Set VerifyQ=

Data_Utility.mxl

/************Set Variables*******************/
Set vCube = $1;
Set vDataType = $2;
Set vMTDRule = $3;
Set vYearName = $4;
Set vDataFolder = D:\\Hyperion\\AARPHyperion\\Data\\;
Set vLogFolder = D:\\Hyperion\\AARPHyperion\\AARP_Scripts\\Logs\\;
/************Turn spooling on*******************/

Set message level all;


Set vLogFileName = "$vLogFolder\Data_Utility~$vCube~$vDataType.log";
echo vLogFileName is "$vLogFileName";
Spool on to "$vLogFileName";
/************Display Parameters*******************/
echo This script clears and loads data using the following parameters:;
echo Cube: "$vCube";
echo DataType: "$vDataType";
echo Year: "$vYearName";
echo MTD Rule: "$vMTDRule";
echo YTD Rule: "$vYTDRule";
echo Data Folder: "$vDataFolder";
echo Log Folder: "$vLogFolder";
/****************Login**************************/
login "Admin" "Password123" on '10.158.128.72:1423';
/************ clear data ***************/
echo
***************************************************************************
**;
echo ****** Clear all "$vDataType" data in "$vCube" ******;
alter database "$vCube"."$vCube" clear data in region "{([$vDataType],[$vYearName])}"
physical;
echo
***************************************************************************
**;
echo ****** Clear complete ******;
echo ;
/************ Load data ***************/

echo
***************************************************************************
**;
echo ****** Load "$vYearName" "$vDataType" data to "$vCube" using "^$vMTDRule"
Rule File ******;
Set vErrFileName = "$vLogFolder\Data_Utility~$vCube~$vDataType~$vYearName.err";
goto "$vYearName";
define label 'CurYear';
Set vDataFileName = "$vDataFolder\ABF_GL2HYPERION.csv";
goto 'ShowDataFileName';
define label 'PriorYear';
Set vDataFileName = "$vDataFolder\ABF_GL2HYPERION$vYearName.csv";
define label 'ShowDataFileName';
echo Data File Name: "$vDataFileName";
echo Error File Name: "$vErrFileName";
import database "$vCube"."$vCube" data from local text data_file "$vDataFileName" using
server rules_file "^$vMTDRule" on error write to "$vErrFileName";
echo
***************************************************************************
**;
echo ****** Load complete ******;
echo ;
/****************Logout and Exit**************/
logout;
exit;
spool off;

Automating Calc Manager Rules for Oracle Hyperion Planning

Oracles Calculation Manager has a host of features for creating business rules across the
Hyperion suite of products. Today I want to focus on how to automate those rules in a
Hyperion Planning environment. If you have Calculation Manager rules that you would like
to schedule to run on a periodic basis, including rules with run-time prompts, this post is for
you.
Step 1: Create an encrypted password file

The automation utilities for Planning include the ability to create an encrypted password file.
This is a recommended step in the process of automating rules.
On the Planning server go to the utilities directory (on my development environment this is
located at E:\Oracle\Middleware\user_projects\PLANNING0\Planning\planning1)
Open a command prompt and navigate to that directory. Run the PasswordEncryption.cmd
utility providing a filename and path for the encrypted file output:

It will prompt you for the password to encrypt. Once you type it in, it will generate the
password file password.txt in the directory specified.
Step 2: Create the Runtime Prompts file

Select the rule you want to automate from the business rules section of Planning. My example
rule is called Rollup and has a prompt for an Entity in the rule when a user runs it from a
web form. I would like to have the same rule run nightly and have it run for Total Entity.
Select Total Entity in the prompt box and then click on the Create runtime prompt values
file button.

This will create a file with the name of the rule (in my example Rollup.xml) on the Planning
server that contains the runtime prompt values specified. On my development server its here
(E:\Oracle\Middleware\user_projects\PLANNING0\Planning\planning\RTP\admin):

If you open the file in notepad youll see that its not actually an xml file, just plain text with
the values supplied. My rule contains Personal Preference variables in addition to the run
time prompts and they are also spelled out in the XML file.

You could create this file yourself from scratch following the syntax used in this example.
Step 3: Launch the rule using the /validate parameter to make sure you are
doing it right using the Command Line!

The Syntax is:


CalcMgrCmdLineLauncher.cmd -f:password.txt /A:PlanBase /U:Admin /D:WrkForce
/R:Rollup/F:E:\Oracle\Middleware\user_projects\PLANNING0\Planning\planning1\RTP\ad
min\Rollup.xml /Validate

Where
f specifies the name of the password file we created in step 1.
/A is the name of the application.
/U is the username that the password corresponds to.
/D is the name of the database.
/R is the name of the rule
/F is the name and location of the runtime prompts values file we created in Step 2.
You should see it parse the variables and just return to the command prompt.

Step 4: Run for real

If everything looks good, remove the /validate parameter and run it. You can now wrap this
up in a batch file and schedule it to run as needed using your operating systems utilities. If in
the future the password changes for the user that you are using to run this you will need to rerun the Password Encryption utility to create a new password file.
A simple batch file to run this would look like this:

In a windows environment you could then use the Task Scheduler to call this batch file on a
frequency of your choice.

Automate Life Cycle Management in


Hyperion Shared Services 11.1.2.3
The purpose of this document is to demonstrate features available in Hyperion
11.1.2.3 to automate Life Cycle Management (LCM) in Shared Services using
Command Utilities. Hyperion Administrators will be able to take advantage of
these utilities to automate LCM using any scheduling scripting tool based on the
hosted environment. In this example we will be focusing on automating this
utility using windows services.

Note: The process depicted below is on single hosted windows server


environment

The following options are available to automate to LCM Process:

1)
2)

Using the utility.bat and


Using the epm_clonexport.bat and epm_cloneimport.bat New Feature
in 11.1.2.3!!!
The purpose of the utility.bat is to automate LCM Artifacts based on pre-defined
migration definition file. A good example would be to clone application during
major milestones of the budget or as annual archive process.

The purpose of the second option which is the EPM Clone Utility would be to
export and import all applications and data for an EPM instance for the purpose
of moving it to another system (aka. cloning).

Automate LCM Using Utility.bat

This command utility provides an alternative way to migrate entire applications,


or individual artifacts, from source to destination.

1.

Creation of Migration Definition File

An artifact to be migrated must be first defined. A migration file definition is


usually created while performing an LCM Migration. This file definition was pretty
evident in release prior to Hyperion EPM 11.1.2.2. Since 11.1.2.2, Oracle
supposedly has modification to the LCM Migration process at least from a
perspective of screens. As we know One to step forward, two steps behind.

We would have noticed that during the LCM Export Migration Process, two files
on any artifact being exported are generated; an export.xml file and a
corresponding import.xml (see screenshot below).

For a detail definition on how to define these XML files has been documented in
the Lifecycle Management Guide. The easiest way would be is to create these
definitions files manually by exporting the artifacts that needs to be
systematically exported or archived using LCM.

In this example, we would be exporting all planning artifacts for the application
PubSect and the following artifact file definition has been created
lcm_pubsect_07052013.

The exported artifact also contain export definition file. You can also set this in
archive folder.

Use this definition file to automate the LCM Export using the command line
utility.bat located in the following location
C:\Oracle\Middleware\user_projects\epmsystem1\bin\

Note: The first time the utility file is execute, the export file prompts for
username and password. After the completion of the first execution, the export
file automatically stores the username and encrypted password.

2. Execute the utility command as a batch file

Create a batch file to execute the utility.

3. Schedule file as batch services on windows server if necessary

Create a basic task using the Windows Task Scheduler (Control Panel -> Task
Scheduler)

AUTOMATE cloning the epm_clone.bat

Similar to the utility.bat file, there is a new utility to export all artifacts from one
server to another. This can be used as an alternative to clone an existing
environment.

1)

EPMExportAll clones all the applications in an environment under one single


folder.

2)

EPMImportAll - imports all the applications cloned in EPMExportAll into another


environment.

Note:

You can only execute EPMImportAll in an environment where there are no


applications for Planning, Financial Management, and Profitability and Cost
Management.

You must copy the cloned export content in the EPMExportAll folder from the
source environment to the target environment in the same File System folder
location.

By default EPMImportAll uses the import.xml from the EPMExportAll folder to


execute the import.

Syntax:
epm_cloneexport.bat input.properties
epm_cloneimport.bat input.properties

input_properties contains the username and password details.


user=admin
password=password

Automating Planning Administrative Processes Using the Oracle Hyperion


Enterprise Performance Management Architect, Fusion Edition Batch Client
11.1.2

Purpose
This tutorial covers how to use the Performance Management Architect Batch Client to create
and deploy Oracle Hyperion Planning, Fusion Edition 11.1.2 applications.

Time to Complete
Approximately 1 hour.

Overview
Performance Management Architect Batch Client enables you to combine processes such as
data export, metadata loads, data loads, and calculations and run these operations during your
normal nightly or weekly load process. You can use the Batch Client to perform many tasks,
including the following:

Create Performance Management Architect applications for Planning

Load metadata into Performance Management Architect

Update security-related properties on dimensions and measures

You can run the Performance Management Architect Batch Client in two modes:

Command line modeYou can enter commands interactively. Each


command statement can span multiple lines. Command statements are
terminated by a semi colon delimiter , and commands are executed
immediately

Script mode In this mode, Batch Client executes a series of commands


without your interaction. You can specify a command file and an optional
result log file at program startup. You can schedule the execution of script
by using a third-party scheduler.

In this tutorial, you perform the steps to create and deploy Planning 11.1.2 applications using
the Batch Client in command line mode. After you deploy the application, you access it in
Application Library.

Software and Hardware Requirements


The following is a list of software requirements:

Oracle Hyperion Planning Plus 11.1.2

Oracle Hyperion Planning Plus 11.1.2 includes the following components:

Oracle Hyperion Enterprise Performance Management System Release


11.1.2 - Start Here: Installation Documents and Readmes

Oracle Hyperion Enterprise Performance Management System Installer,


Fusion Edition Release 11.1.2

Hyperion Enterprise Performance Management System Foundation


Services Release 11.1.2

Oracle Hyperion Enterprise Performance Management System Additional


Content Release 11.1.2

Oracle Hyperion Calculation Manager Release 11.1.2

Oracle Hyperion Enterprise Performance Management Architect, Fusion


Edition Release 11.1.2

Oracle Essbase Release 11.1.2

Oracle Essbase Clients Release 11.1.2

Oracle Essbase Spreadsheet Add-in Release 11.1.2

Oracle Hyperion Financial Reporting, Fusion Edition Release 11.1.2

Oracle Hyperion Enterprise Performance Management Reporting and


Analysis Core Components Release 11.1.2

Hyperion Web Analysis Release 11.1.2

Oracle Hyperion Planning, Fusion Edition Release 11.1.2

Optional: Hyperion Data Integration Management Adapters Release


11.1.1.1.0

Optional: Oracle Hyperion Smart View for Office, Fusion Edition Release
11.1.2

Optional: Oracle Data Integrator, Oracle Data Profiling, and Oracle Data
Quality for Data Integrator 10g (10.1.3.5.0)

Optional: Oracle Identity Management 11g (11.1.1.1.0)

The batch client is installed automatically when you install Performance Management
Architect. You can run Batch Client on Windows platforms. When you install Performance
Management Architect, a batch file is automatically created to setup the class paths that are
generated during installation.

Prerequisites
Before starting this tutorial, you should:
1 . Have administrator access to a working installation of Planning 11.1.2.

2 . Have administrator access to a working installation of Hyperion Shared Services 11.1.2.

3 . Have administrator access to a working installation of Enterprise Performance Management


Architect 11.1.2.

Preparing to Use Batch Client


To prepare using Batch Client:
Downloading Documentation

To download documentation:
1 . Launch your browser.

2 . Navigate to the Oracle Enterprise Performance Management System, Fusion Edition Release
11.1.2 Documentation Library by using the following URL:
http://download.oracle.com/docs/cd/E17236_01/index.htm

3 . In the left menu, click Foundation Services.

4 . Under Oracle Hyperion Enterprise Performance Management Architect, Fusion Edition, for
Batch Client User's Guide, right-click PDF and select Save Link As....

5 . Navigate to the location where you want to save the file, and click Save.

Accessing Batch Client

To access Batch Client:


1 . Select Start, Programs, then Oracle Enterprise Performance Management System, then
Foundation Services, then Performance Management Architect,and then Start EPMA Batch
Client.
The Batch Client command window is displayed:

Logging On to Performance Management Architect

To log on to Performance Management Architect:


1 . Set the server URLs by using the following commands, and press Enter after each line item:
set bpmaserverurl=http://localhost/hyperion-bpma-server;
set workspaceurl=http://localhost:19000/workspace;
Note: Contact your administrator for your company's server URLs.

2 . Enter your Performance Management Architect username and password with the following
syntax, and press Enter:
login username,password;

Creating Planning Applications


Performance Management Architect Batch Client enables you to create a new, empty
Planning application with the specified name. Empty applications are oftentimes referred to
as shell applications. After creating shell applications, you can create, import, or copy
dimensions and members in Shared Library and within Planning applications.
Creating Shell Applications

To create shells for Planning applications:


1 . Create the shell application with the following syntax, and press Enter:
Create Application Properties(ApplicationName, ApplicationDescription, ApplicationType)
Values('PlanBud', 'Planning Budget Application', 'Planning');

Application NameA string containing a valid name for the application. In


this example, 'PlanBud' is used.

ApplicationDescriptionA string containing a valid description for the


application. In this example, 'Planning Budget Application' is used.

ApplicationTypeEnter 'Planning' for Planning applications.

The following message is displayed: The application "PlanBud" has been created with

objectid "1_4".

Adding Dimensions and Members

You can create dimensions and members in Shared Library or within an application.
You can add dimensions and members to the Shared Library, or you can copy them from the
Shared Library to an application. You can add dimensions as shared dimensions or you can
copy them to the application as local dimensions. You can insert a copy of a member as a
shared member in an application. However, you can use the Insert Member command only on
local dimensions and Shared Library dimensions. You cannot insert members in a shared
dimension in an application.
You can also import dimensions and members to an application or Shared Library using an
ADS file.
This section covers the different methods of adding dimensions and members by using Batch
Client:
1 . Create dimensions with the following syntax and press Enter:
Create Dimension Properties(ApplicationName, DimensionName, DimensionDescription,
DimensionType) Values(#Shared,'Entity','Entity Dimension','Entity');

ApplicationNameThe name of an existing application. Use #Shared to


create a dimension in the Shared Library.

DimensionNameA valid name for the dimension. In this example, 'Entity' is


used.

Dimension DescriptionA string containing a valid description for the


dimension. In this example, 'Entity Dimension' is used.

DimensionTypeDimension Type can be any one of the following: Account,


Alias, AllocationType, Attribute, ConsolidationMethod, Country, Currency,
Entity, Generic, ICP, Measure, Scenario, SecurityClass, SmartList, Time, UDA,
Value, Version, View, Year.

Note: Planning requires six dimensions. If these six dimensions are already created in Dimension
Library, you can add them to the application instead.

2 . Create members with the following syntax and press Enter:


Create Member Properties(ApplicationName, DimensionName, ParentName, MemberName,

MemberDescription) Values('PlanBud','Account', '#root', 'Income Statement', 'Income Statement


Accounts');

ApplicationNameThe name of an existing application. Use #Shared to


create a dimension in the Shared Library. In this example, 'PlanBud' is used.

DimensionNameThe name of an existing dimension. In this example,


'Account' is used.

ParentNameThe name of the parent under which to insert the newly


created member. Use #Root to add a new member at the top level of the
tree.

MemberNameA valid name for the new member. In this example, 'Income
Statement' is used.

MemberDescriptionA description for the new member. In this example,


'Income Statement Accounts' is used.

3 . Import dimensions and members by using an ADS file with the following syntax, and press
Enter:
Execute Import Parameters(importtype, profilename, filename,
waitforcompletion)Values('flatfile', 'PlanApp', '.\AppFiles\PlanApp.ads', 'true');

ImportTypeThe type of import to perform. Allowed values are: FlatFile and


InterfaceTables.

ProfileNameThe name of an existing import profile. In this example,


'PlanApp' is used.

FileNameThe name of the flat file to import, if performing a flat file type
import. In this example, the 'PlanApp.ads' flat file in the AppFiles directory is
used.

WaitForCompletionIf set to true, Batch Client waits for the job to finish. If
set to false, the Batch Client submits the job and continues. Allowed values
are: True or False.

The following figure displays a sample ADS file:

4 . Use the following syntax to copy dimensions within Shared Library, within an application, or
between Shared Library and an application, and press Enter:
Copy Dimension Properties(ApplicationName, DimensionName, TargetDimensionName,
TargetDimensionDescription, destApplicationName) Values('#Shared', 'Scenario','Scenario',
'Scenario Dimension', 'PlanBud');

ApplicationNameThe name of an existing application. Use #Shared to copy


a dimension from the Shared Library.

DimensionNameThe name of an existing dimension. In this example,


'Scenario' is used.

TargetDimensionNameThe name of the target dimension. In this example,


'Scenario' is used.

TargetDimensionDescriptionThe description of the target dimension. In this


example, 'Scenario Dimension' is used.

destApplicationNameThe name of the destination application. In this


example, 'PlanBud' is used.

Note: You cannot copy a dimension directly from one application to another.

5 . Use the following syntax to add an existing dimension from the Shared Library to the specified
application, and press Enter after each line item:
SET APPLICATION = 'PlanBud';
Include Dimension Properties(DimensionName, IncludeAsShared) Values('C_Alias', 'true');

DimensionNameThe name of an existing dimension in the Shared Library. In


this example, 'C_Alias' is used.

IncludeAsSharedUse a value of true to include the dimension as a shared


dimension. Use a value of false to include a local copy of the dimension
within the application.

The dimension can be added as a shared dimension or copied to the application as a local
dimension.
Note: You must set the application name before the Include Dimension command. By setting the
application name, command lines use it if the application is not explicitly defined within a
command.

6 . Use the following syntax to insert a copy of a member as a shared member within an application,
and press Enter after each line item:
SET APPLICATION = 'PlanBud';
Insert Member Properties(DimensionName, ParentName, InsertMemberName,
MemberToInsertName) Values('Account', 'Par1', Mem1, Mem2);

DimensionNameThe name of an existing dimension. In this example,


'Account' is used.

ParentNameName of the parent to insert the member under. In this


example, 'Par' is used.

InsertMemberNameName of the member to insert the member under. In


this example, 'Mem1' is used.

MemberToInsertNameName of the shared member to be inserted. In this


example, 'Mem2' is used.

You can use the Insert Member command only on local dimensions and Shared Library
dimensions. You cannot insert members in a shared dimension within an application.
Note: You must set the application name before the In command. By setting the application
name, command lines use it if the application is not explicitly defined within a command.

Alternatively, you can set the application name to #Shared if you are copying a member from
Shared Library.

Deploying Planning Applications


After creating the shell and adding dimensions and members, you deploy the application to
make it accessible in Workspace. To deploy Planning applications, you must be provisioned
with the Application Creator or Planning Administrator role.
1 . Deploy a Planning application with the following syntax, and press Enter:
Execute Deploy Parameters(ApplicationName, InstanceName, ApplicationServer, HubProject,
waitforcompletion, dataSourceName, CreateOutline) Values('PlanBud', 'PLANNING',
'PLANNING', 'Default Application Group', 'true', 'ST01PLN3', 'true');

ApplicationNameThe name of an existing application. In this example,


'PlanBud' is used.

InstanceNameThe name of the instance to deploy to. In this example,


'PLANNING' is used.

ApplicationServerThe name of the application server to deploy to. In this


example, 'PLANNING' is used.

HubProjectThe Shared Services project to add the deployed application to.


In this example, 'Default Application Group' is used.

WaitForCompletionIf set to true, Batch Client waits for the job to finish. If
set to false, Batch Client submits the job and continues. Allowed values are:

True or False

datasourceNameCreates a data source with the specified name. In this


example, 'ST01PLN3' is used.

CreateOutlineCreates the Essbase outline if you are deploying the


application for the first time. Allowed values are True or False.

For additional Planning parameters, see the Oracle Hyperion Enterprise Performance
Management Architect, Fusion Edition 11.1.2 Batch Client's User Guide.
When the deployment is completed, the following message is displayed:

Accessing the Deployed Application in Application Library


You must log on to Workspace with an administrator account. To access the deployed
application in Application Library:
1 . Log on to Workspace.

2 . Select Navigate, then Administer, and then Application Library.

3 . Click the Planning application that you deployed in Batch Client. In this example, 'PlanBud' is
selected.

When you select an application, the following information is displayed in the lower pane:

SummaryContains the name, type, date created, date last deployed, and
the associated data synchronizations.

DescriptionContains the information that you provided in the Description


field when you created the application.

DimensionsLists the dimensions available in the application.

PropertiesDisplays the status, default currency, and specific properties set


for the application.

SynchronizationsLists the data synchronizations for this application.

Rules / Rule SetEnumerates the rules and rule sets defined in Calculation
Manager for this application.

You might also like