601,100
562,"CHARACTERDELIMITED"
586,"task_create_sample.blb"
585,"C:\Program Files\Applix\Custom\TM1Data\pm_2004_10_15\task_create_sample.blb"
564,
565,"bxabyQNq=U0sX^JcnvfnZp1k9PT5Iy2?SOG?Wh;uR9PMC\sbrRePX1]q8s9a4OxD;\hZ8GnaMtef0x1;MtewfwPOSaQ^:afQZLvWBMg6YINvUQ9djR`6P0MXlFs;0ik5Wr>3mZh6R9>GYLLYBh4L\_Jy@JXtRc\ifAzNkcYCwgpPEiTos?=D<x1_Qtr\x^IBojh>^hsA"
559,0
593,
594,
595,
597,
598,
596,
800,
801,
566,0
567,","
588,"."
589,","
568,""""
570,
571,subman_single
569,0
592,0
599,1000
560,9
pTemplate
pDimension
pSubset
pExistingTemplate
pLoadType
pAliasName
pObjectType
pPlan
pSourceFile
561,9
2
2
2
2
2
2
2
2
2
590,9
pTemplate,""
pDimension,""
pSubset,""
pExistingTemplate,""
pLoadType,"SUBSET"
pAliasName,""
pObjectType,""
pPlan,""
pSourceFile,""
637,9
pTemplate,Template
pDimension,Source Dimension
pSubset,Source Subset
pExistingTemplate,Existing Template
pLoadType,Load Type
pAliasName,Alias Name
pObjectType,lias Name
pPlan,Type
pSourceFile,Source File
577,5
vParent
vElement
vName
vGroup
vSubset
578,5
2
2
2
2
2
579,5
1
2
3
4
5
580,5
0
0
0
0
0
581,5
0
0
0
0
0
582,5
VarType=32	ColType=827	
VarType=32	ColType=827	
VarType=32	ColType=827	
VarType=32	ColType=827	
VarType=32	ColType=827	
572,51

#****Begin: Generated Statements***
#****End: Generated Statements****

SetInputCharacterSet( 'TM1CS_UTF8' );

vObjectPrefix = attrs('}sm_controls', 'subman_object_prefix', 'value');
vObjectSeparator = attrs('}sm_controls', 'subman_object_separator', 'value');

vTaskDimension = '';
vBindingCube = '';

if (pObjectType @= 'VERSION');
vTaskDimension = vObjectPrefix | 'sm_versiontasks' | vObjectSeparator | pPlan | vObjectSeparator | pTemplate;
vBindingCube = vObjectPrefix | 'sm_versionbindings' | vObjectSeparator | pPlan | vObjectSeparator | pTemplate;
else;
vTaskDimension = vObjectPrefix | 'sm_templatetasks' | vObjectSeparator | pTemplate;
vBindingCube = vObjectPrefix | 'sm_templatebindings' | vObjectSeparator | pTemplate;
endif;

if (dimensionExists(vTaskDimension)=0);
dimensioncreate(vTaskDimension);
endif;

AttrInsert(vTaskDimension , '', 'source_type', 'S');

vAttributeDim = '}sm_control_task_attributes';
vAttributeSubset = 'sm_template_attributes';

vAttrSize = SUBSETGETSIZE(vAttributeDim , vAttributeSubset );

vAttrIndex = 1;
while (vAttrIndex <= vAttrSize);
vAttr = SUBSETGETELEMENTNAME(vAttributeDim , vAttributeSubset , vAttrIndex);

if (ELISANC(vAttributeDim, 'Alias', vAttr) > 0);
AttrInsert(vTaskDimension , '', vAttr, 'A');

elseif (ELISANC(vAttributeDim, 'Text', vAttr) > 0);
AttrInsert(vTaskDimension , '', vAttr, 'S');

elseif (ELISANC(vAttributeDim, 'Numeric', vAttr) > 0);
AttrInsert(vTaskDimension , '', vAttr, 'N');

endif;

vAttrIndex = vAttrIndex + 1;
end;


DATASOURCENAMEFORSERVER =  pSourcefile;
573,44

#****Begin: Generated Statements***
#****End: Generated Statements****


vParentIX = 0;
if (vParent @= '');

vEleIX = DIMIX(vTaskDimension, vElement);
if (vEleIX = 0);
dimensionelementinsert(vTaskDimension, '', vElement, 'N');
endif;
vLastAdded = vElement;

if (vGroup @<> '');
vGroupIX = DIMIX('}Groups', vGroup);
if (vGroupIX = 0);
#ADDGROUP(vGroup);
endif;
endif;

elseif (vParent @= 'BINDING');
elseif(vParent @= 'ATTRIBUTE');
elseif(vParent @= 'OWNER');
elseif(vParent @= 'WORKBOOK');
else;

vParIX = DIMIX(vTaskDimension, vParent);
if (vParIX = 0);
dimensionelementinsert(vTaskDimension, '', vParent, 'N');
endif;
dimensionelementinsert(vTaskDimension, '', vElement, 'N');
dimensionelementcomponentadd(vTaskDimension, vParent, vElement, 1);
vLastAdded = vElement;
if (vGroup @<> '');
vGroupIX = DIMIX('}Groups', vGroup);
if (vGroupIX = 0);
#ADDGROUP(vGroup);
endif;
endif;
endif;



574,76

#****Begin: Generated Statements***
#****End: Generated Statements****


if (vParent @= '');
attrputs(vName, vTaskDimension, vElement, 'Name');
attrputs(vGroup, vTaskDimension, vElement, 'Owner Group');
attrputs(vName, vTaskDimension, vElement, 'Task');
vTaskElement = vElement;

#elseif (vParent @= 'WORKBOOK');
#CellPuts( vGroup , vBindingCube,  vName, vTaskElement, 'workbook');
#CellPuts( vSubset , vBindingCube,  vName, vTaskElement, 'worksheet');
#CellPuts( vElement , vBindingCube,  vName, vTaskElement, 'workbook_path');

elseif (vParent @= 'BINDING');
CellPuts( vGroup , vBindingCube,  vName, vTaskElement, 'element');
CellPuts( vSubset , vBindingCube,  vName, vTaskElement, 'subset');
CellPuts( vElement , vBindingCube,  vName, vTaskElement, 'Alias');


elseif(vParent @= 'OWNER');
#ASSIGNCLIENTTOGROUP(vName, vGroup);

elseif(vParent @= 'ATTRIBUTE');
vAttrExists = DIMIX('}ElementAttributes_' | vTaskDimension, vGroup);

if (vAttrExists > 0);
if (vElement @= 'STRING');
if(ELISANC('}sm_control_task_attributes', 'Alias', vGroup)  = 0);

#For handling CAMID, which comes in as
# CAMID("qalab:u:1bb094986d880d45add1d69716b9870c")
#but double quotes will be missing, we need to re-add these
#asciioutput ( 'c:\temp\out345.txt', 'INOWNER', vParent, vName );
IF ( SUBST ( vSubset, 1, 6 ) @= 'CAMID(' );
  vPart1 = SUBST ( vSubset, 1, 6 ) | '"';
  vPart2 = SUBST ( vSubset, 7, LONG(vSubset) - 7 ) | '")';
  vSubset = vPart1 | vPart2;
#asciioutput ( 'c:\temp\out345.txt', 'PARTS', vPart1, vPart2,  vName );
ENDIF;

attrputs(vSubset, vTaskDimension, vName, vGroup);
else;

vUnique = 1;
vTestIX = DIMIX(vTaskDimension, vGroup);
if(vTestIX > 0);
vVerifyIX = DIMIX(vTaskDimension, vName);
if(vTestIX <> vVerifyIX);
vUnique = 0;
vGroup = vGroup | ' (' | vName | ')';
endif;
endif;


endif;
ELSE;
attrputn(NUMBR(vSubset), vTaskDimension, vName, vGroup);
endif;
endif;

else;

vTaskElement = vElement;

attrputs(vName, vTaskDimension, vElement, 'Name');
attrputs(vGroup, vTaskDimension, vElement, 'Owner Group');
vMeIX = DIMIX(vTaskDimension, vElement);
vAliasIX = DIMIX(vTaskDimension, vName);
if (vAliasIX = 0 % vAliasIX = vMeIX);
attrputs(vName, vTaskDimension, vElement, 'Task');
endif;
endif;

575,8

#****Begin: Generated Statements***
#****End: Generated Statements****

vSourceDimension = '';
bFixHierarchy = 0;


576,CubeAction=1511	DataAction=1503	CubeLogChanges=0	
638,1
804,0
1217,1
900,
901,
902,
903,
906,
907,
908,
904,0
905,0
909,0
911,
912,
913,
914,
915,
916,
917,0
918,0
919,0
920,0
921,""
922,""
923,0
924,""
925,""
926,""
927,""
