Professional Documents
Culture Documents
Anything to the right of the double slash will be ignored during the validation
process.
Example:
//This is a remark
*ADD_TABLE={tablename}
*BLOCK_SECURITY
*CALC_EACH_PERIOD
*CALCULATE_DIFFERENCE = 0 | 1
*COMMIT
*COMMIT_MAXMEMBERS
*CLEAR_DESTINATION
*DESTINATION
*GO
*IGNORE_SECURITY
*IGNORE_STATUS
*INCLUDE {includedfile}(Param1,Param2,….)
*LOCAL_CURRENCY={Member}
*LOGIC_MODE = 0 | 1 | 2
*MEASURES = {dimension}
*NO_PARALLEL_QUERY
*PROCESS_FAC2
*PUT( )
*PUTSCOPE_BY
*QUERY_SIZE = 0 | 1 | 2
*QUERY_TYPE = 0 | 1 | 2
*REC( )
*RUNLOGIC / ENDRUNLOGIC
*TEST_WHEN
*USE {filename}
*USE_UNSIGNEDDATA
*WHEN / ENDWHEN
*WRITE_TO_FILE = {filename}
*WRITE_TO_FAC2
Included Files
*INCLUDE TranslationLogic
…where TranslationLogic is the name of the file containing the translation logic
instructions.
*INCLUDE {includedfile}(Param1,Param2,….)
The parameters, inside the included file, MUST be referenced to with the reserved
names %Pn%, where n is the position of the parameter in the passed list.
Example:
[Account].[#1] = {expression}
[Account].[#2] = ([ENTITY].currentmember.parent,[Account].[#1])
[Account].[#1] = {expression}
*COMMIT
[Account].[#2] = ([ENTITY].currentmember.parent,[Account].[1]
does not have the pound sign (#), because it is a “stored‟ amount read from the
cube.
Remark: Any number of commit instructions can be entered in a logic file. However,
the number of commit instructions should be kept to the minimum, because they
have a negative impact on the overall performance of the logic execution.
*COMMIT_EACH_MEMBER={dimname}
Example:
*COMMIT_EACH_LEVEL={dimname}
…the logic will run from the first modified period up to period 2002.DEC.
*LAST_MEMBER TIME=%PREFIX%.DEC
In this case, the year will be the year of the last modified period.
*LAST_MEMBER TIME=[%PREFIX%.DEC].LEAD(6)
…will enable the logic to run from the first selected period until June of the following
year.
*XDIM_REQUIRED
*XDIM_REQUIRED={dimname}[,{dimname}]
Example:
*XDIM_REQUIRED=CATEGORY, TIME
*PROCESS_EACH_MEMBER
*PROCESS_EACH_MEMBER={dimname1}[, {dimname2}, …]
It is processed separately, before the logic is interpreted. This makes the logic
behave exactly as if it had been called multiple times (once for each member in the
dimensions listed in the instruction).
The member set to process for the named dimensions must be explicitly passed to
the logic call, as if such dimension sets were required (see instruction
XDIM_REQUIRED).
i.e., it sorts the time members from the oldest to the newest and fills all gaps in the
range. For example, if the members passed are:
2001.Mar, 2001.Jan
…the resulting set whose members will be processed individually will be:
{text}
{text}
*NEXT
Example:
*FOR %CURR%=USD,EURO
[measures].[!Avg_%CURR%] = {expression}
*NEXT
*NEXT
*WHEN TIME
*IS <>TOT.INP
*WHEN ACCOUNT
*IS PERCENT.ALLOC
*FOR %YEAR%=2003,2004,2005
*FOR %MONTH%=JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC
*REC(FACTOR=GET(ACCOUNT="TOT.OVRHEAD",TIME="TOT.INP")/
100,TIME="%YEAR%.%MONTH%")
*NEXT
*NEXT
*ENDWHEN
*ENDWHEN
// logic content
*NEXT
*FOR ORDER_TIME %MYTIME% = %TIME_SET%
*XDIM_MEMBERSET CURRENCY=USD,EURO
* XDIM_MEMBERSET {Dimension}<>{MemberSet}
*XDIM_MEMBERSET INTCO<>NonInterco
// a workaround
*XDIM_MEMBERSET INTCO<>INVALID
// a better syntax
*XDIM_GETMEMBERSET
*XDIM_ADDMEMBERSET ENTITY=SalesFrance
…the logic will be executed for SalesItaly AND SalesFrance.
*XDIM_MEMBERSET ENTITY=SalesFrance
…the logic would have been executed for SalesFrance only, irrespective of the entity
where the data had been entered.
This instruction, in case the entities to process exceed the limit of 50 members, will
break the query into multiple queries of no more than 50 entities each.
*XDIM_MAXMEMBERS Entity = 50
*XDIM_MAXMEMBERS Time = 1
Or..
*COMMIT_MAXMEMBERS
…and…
…the user can retrieve the ID of all members in the CURRENCY dimension where
the property GROUP has the value REP.
*MEMBERSET((%REPORTING_CURRENCIES%, “filter{[CURRENCY].members,
[currency].properties(“GROUP”)=”REP””)
*XDIM_MEMBER_SET CURRENCY=%REPORTING_CURRENCIES%
xxx