Вы находитесь на странице: 1из 4

Date Function Essbase 9.3.

1 do not have date function therefore administrator need to install custom defined date function for calculations. Date function has already been installed in Production and Developmnet. Below process explains the methodology incase administrators need to install the Data function again. 1. Extract the Date.zip folder in some new directory in Server. This will create a Date folder. 2. Copy all files under Date folder including the JAR file and all other files to the Essbase server in the directory $HYPERION_HOME/products/Essbase/EssbaseServer/java/udf. 3. Modify the udf.policy file and grant the appropriate permissions $HYPERION_HOME/products/Essbase/EssbaseServer/java/udf.policy Put the below code at bottom shown in bold of the file. grant codeBase "file:${essbase.java.home}/../java/udf/CDF_Date.jar" { permission java.security.AllPermission; }; 4. Convert CDFRegisterAll.cmd to CDFRegisterAll.sh so that it can run in Unix. Then execute the CDFRegisterAll.sh file in unix. 5. Test the result. Please login to EAS console and right click on any database and then click on Create Calc script. Administrators should see new functions on right hand side pane in EAS. Function include '@JstrCurrDay, '@JstrCurrYear etc 6. Finally ensure that Date.jar file is in classpath of Unix system. Date function help URL is given below.Users need to have Oracle account to have access to this URL. https://submitcodesamples.samplecode.oracle.com/ds/viewMessage.do?dsMessageId=76832&dsForumId=627 Below given explanation is from the Oracle site for Date function. Artifact ID: CS279 (CDF - Date Functions) URL: https://submit-codesamples.samplecode.oracle.com/servlets/tracking/id/CS279 Modified by: Michael R. Larimer (mlarimer) mike dot larimer at oracle dot com The following modifications were made to this artifact: ================================================================================ Activity | Old value | New value ================================================================================ Artifact created | | --------------------------------------------------------------------------------

How it works set to new value | | Leverages the Essbase CDF feature | | to extend the Essbase calculator ||. -------------------------------------------------------------------------------Author name set to new value | | Mike Larimer, Toufic Wakim, Matt | | Milella -------------------------------------------------------------------------------Author e-mail set to new value | | mike dot larimer at oracle dot com, toufic.w | | akim at oracle dot com, matt.milella@ora | | cle.com -------------------------------------------------------------------------------Title set to new value | | CDF - Date Functions -------------------------------------------------------------------------------Sample type set to new value | | example code -------------------------------------------------------------------------------Code Samples Status set to new v | | Created alue | | -------------------------------------------------------------------------------New value added to attribute Rel | | Business Intelligence ated Technologies | | -------------------------------------------------------------------------------New value added to attribute Pro | | Essbase: Custom Defined Functions duct | | (CDFs) -------------------------------------------------------------------------------Added file attachment | | Date.zip -------------------------------------------------------------------------------What it does set to new value ************* * New value * ************* This sample contains many functions pertaining to dates that can be used within a calculation script. @JcurrCashDay - Returns the current cash day as a String by prefixing "Cashday" to the day of the month. If today is Nov 20, 2008 @JcurrCashDay() returns Cashday20. @JstrCurrYear - Returns the current year as a String by adding the prefix and the suffix. e.g. if today is Nov 20, 2008 @JstrCurrYear("FY","") returns FY2008. @JstrCurrMonth - Returns the current month number as a String by adding the prefix and the suffix. e.g. if today is Nov 20, 2008 @JstrCurrMonth("Month","") returns Month11.

@JstrCurrDay - Returns the current day of the month as a String by adding the prefix and the suffix. e.g. if today is Nov 20, 2008 @JstrCurrDay("Cashday","") returns Cashday20. @JnumCurrYear - Returns the current year as a number. e.g. if today is Nov 20, 2008 @JnumCurrYear() returns 2008. @JnumCurrMonth - Returns the current month as a number. e.g. if today is Nov 20, 2008 @JnumCurrMonth() returns 11. @JnumCurrDay - Returns the current day of the month as a number. e.g. if today is Nov 20, 2008 @JnumCurrDay() returns 20. @JcurrMonthLong - Returns the name of the current month in a long form. e.g. if today is Nov 20, 2008 @JcurrMonthLong() returns November. @JcurrMonthShort - Returns the name of the current month in a short form. e.g. if today is Nov 20, 2008 @JcurrMonthShort() returns Nov. @JcurrDayLong - Returns the name of the current day of week in a long form. e.g. if today is Nov 20, 2008 @JcurrDayLong() returns Thursday. @JcurrDayShort - Returns the name of the current day of week in a short form. e.g. if today is Nov 20, 2008 @JcurrDayShort() returns Thu. @JdaysSince - Returns the number of days from the currentDate to the system date. @JsinceDays - Returns the number of days from the currentDate to the system date. @JdaysUntil - Returns the number of days from the system date until the currentDate. @JuntilDays - Returns the number of days from the system date until the currentDate. @JdaysOffset - Returns the number of days between the firstDate and the secondDate. @JsystemDate - Returns the system date in second from 1/1/1970. @JisToday - Compares the string to the current date. @JgetTimeStamp - Returns a string with the current time stamp. -------------------------------------------------------------------------------How to install set to new value *************

* New value * ************* 1 - Copy the JAR file or files and any related files like properties files to the Essbase server in the directory $HYPERION_HOME/products/Essbase/EssbaseServer/java/udf 2 - Modify the udf.policy file and grant the appropriate permissions if needed $HYPERION_HOME/prod ucts/Essbase/EssbaseServer/java/udf.policy 3 - Register the CDF if necessary. RUNJAVA methods do not need to be registered. Registration script is included in the sample. http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/frameset.htm?ma xl_cdfindex.htm

Вам также может понравиться