Professional Documents
Culture Documents
Calculation Scripts Session 9
Calculation Scripts Session 9
DATACOPY: The DATACOPY command copies a range of data cells to another range within the
database.
Syntax:
DATACOPY mbrName1 TO mbrName2;
mbrName1, mbrName2 - Any valid single member name or member combination, or a function
that returns a single member or member combination.
This command is useful when you must maintain an original set of data values and perform
changes on the copied data set, say if we want to copy all data from Version1 to Version2 then
we can use the following syntax:
DATACOPY Version1 TO Version2;
Lets copy the data from FY11 Actuals to FY12 Budget. Assume that we have below data
Little more about data copy: if any dimension(s) represented by the members in source
combination are not represented in destination combination, then by default the same member
or members from source are assumed to exist in destination to complete the range. The
reverse is not true. Any dimension explicitly represented in destination must be represented by
another member of the same dimension in source. To understand this let have a look at below
example:
Script
CLEARDATA does not clear blocks, even if all data values in a block are #MISSING. (This
statement will make more sence after next session).
Clear Block: Just for theoritical purpose, The CLEARBLOCK command clears blocks of data
and sets them to #MISSING.
Examples
CLEARBLOCK ALL;
CLEARBLOCK UPPER;
CLEARBLOCK NONINPUT;
CLEARBLOCK DYNAMIC;