Running OLAP Command Script Files

Enter the following command at the command prompt to run a script file in Integration Services Shell:

olapicmd -fscriptFileName [> logFileName]

Replace scriptFileName with the name of the script file you are using. Replace logFileName with the name of the file where you want the feedback from the script to be recorded.

For example, the following sample script file, olap_tbc.cbs, was created in a text editor. This script connects to Essbase from the Integration Server computer and generates outlines for a sample database. In the following example, the status command (see STATUS) is used to check the success or failure of each command. The status command returns the execution status in the Integration Services Shell window.

login labmachine1
status
settarget "DSN=labmachine1;UID=hyperion;PWD=password"
status
setcatalog "DSN=TBC_MD;CODEPAGE=
   English_UnitedStates.Latin1@Binary;UID=tbc;PWD=password"
status
setsource "DSN=TBC;CODEPAGE=
   English_UnitedStates.Latin1@Binary;UID=tbc;PWD=password"
status
loadall "OTL=TBC Metaoutline;APP=olaptbc;DBN=Tbf1;FLT_ID=1;
    CALC_SCRIPT=#DEFAULT#;"
status
loadall "OTL=TBC Metaoutline;APP=olaptbc;DBN=Tbf2;FLT_ID=2;
    OTL_CLEAR=Y;"
status
loadall "OTL=TBC Metaoutline;APP=olaptbc;DBN=Tbf3a;FLT_ID=3;
    OTL_CLEAR=N;CALC_SCRIPT=#DEFAULT#;"
status
loadall "OTL=TBC Metaoutline;APP=olaptbc;DBN=Tbf3ec;FLT_ID=3;
    OTL_CLEAR=N;ESSC_SCRIPT=mytest1"
status
exit

To execute the olap_tbc.cbs script file, type

olapicmd -folap_tbc.cbs 

The following sample batch file, olap_tbc.bat, uses input from a script file named olap_tbc.cbs and saves the feedback in a file named olap_tbc.log:

olapicmd -folap_tbc.cbs > olap_tbc.log