Copying Generated Statements

TM1® generates statements dynamically as you change options in the TurboIntegrator window.

You are going to edit the generated statements on the Prolog and Metadata subtabs of the Advanced tab to accomodate an unblanced dimension hierarchy. To make things a little easier, you will copy and paste the generated statements so that they will be available after you change options in the TurboIntegrator window.

Procedure

  1. Click the Advanced tab, then the Prolog sub-tab.
  2. Copy the DimensionDestroyand DimensionCreate functions from between the comment lines
    #****GENERATED STATEMENTS START**** 
    #****GENERATED STATEMENTS FINISH****

    and paste them below the comment lines.

    #****GENERATED STATEMENTS START****
    DIMENSIONDESTROY('unbalanced');
    DIMENSIONCREATE('unbalanced');
    DIMENSIONSORTORDER('unbalanced','ByInput','ASCENDING','ByInput','ASCENDING');
    ****GENERATED STATEMENTS FINISH****
    DIMENSIONDESTROY('unbalanced');
    DIMENSIONCREATE('unbalanced');
  3. Click the Metadata sub-tab.

    There are two functions:

    The DimensionElementInsert function adds a simple (leaf) element to a dimension. You can use this function to add both numeric and string elements.

    The DimensionElementComponentAdd function adds a component (child) to a consolidated element.

  4. Copy all the generated statements and paste them below the last comment line.
    #****GENERATED STATEMENTS START****
    DIMENSIONELEMENTINSERT('unbalanced',",G1,'n');
    DIMENSIONELEMENTINSERT('unbalanced',",TOTAL,'c');
    DIMENSIONELEMENTINSERT('unbalanced',",NORTH,'c');
    DIMENSIONELEMENTINSERT('unbalanced',",TK1,'c');
    DIMENSIONELEMENTCOMPONENTADD('unbalanced',TOTAL,NORTH,1.000000);
    DIMENSIONELEMENTCOMPONENTADD('unbalanced',NORTH,TK1,1.000000);
    DIMENSIONELEMENTCOMPONENTADD('unbalanced',TK1,G1,1.000000);
    ****GENERATED STATEMENTS FINISH****
    DIMENSIONELEMENTINSERT('unbalanced',",G1,'n');
    DIMENSIONELEMENTINSERT('unbalanced',",TOTAL,'c');
    DIMENSIONELEMENTINSERT('unbalanced',",NORTH,'c');
    DIMENSIONELEMENTINSERT('unbalanced',",TK1,'c');
    DIMENSIONELEMENTCOMPONENTADD('unbalanced',TOTAL,NORTH,1.000000);
    DIMENSIONELEMENTCOMPONENTADD('unbalanced',NORTH,TK1,1.000000);
    DIMENSIONELEMENTCOMPONENTADD('unbalanced',TK1,G1,1.000000);