601,100
562,"CHARACTERDELIMITED"
586,"C:\Program Files\Applix\Custom\TM1Data\planSamp\task_create_sample.blb"
585,"C:\Program Files\Applix\Custom\TM1Data\planSamp\task_create_sample.blb"
564,
565,"p>\`<iJdUEj5n=tcaMu8ur[t`wy]0XA3XffIT[rbJPb>d3@detF;mL\]9s=SFYIVyCI<yBdEQPW_sr<f`Bqs[r6IF<aopxt9v0W;W9diZ`P5_uWZ[_64hkc2cLMZ5JagUt9[QzhD<P3fDV\n;qAXQ0oVMCa_op=dUHz<bF[chwZfc\RXD[usxwRvEuYR=@uRpJqWOc1u"
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,4
pTemplate
pPlan
pSourceFile
pObjectType
561,4
2
2
2
2
590,4
pTemplate,""
pPlan,""
pSourceFile,""
pObjectType,""
637,4
pTemplate,Template
pPlan,Plan
pSourceFile,Source File
pObjectType,Load Type
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,47

#****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;

##output task attachment list for this version
vOutputFile = 'tempfile' | numbertostring(RAND);
while (FileExists(vOutputFile)=1);
vOutputFile = 'tempfile' | numbertostring(RAND);
end;

ExecuteProcess('}sm_dump_task_attachments_for_one_version', 'pPlan', pPlan, 'pVersion', pTemplate, 'pBlob',vOutputFile );

else;
vTaskDimension = vObjectPrefix | 'sm_templatetasks' | vObjectSeparator | pTemplate;
vBindingCube = vObjectPrefix | 'sm_templatebindings' | vObjectSeparator | pTemplate;
endif;

vEleIndex = DIMSIZ(vTaskDimension);
while (vEleIndex > 0);

DIMENSIONELEMENTDELETE(vTaskDimension, DIMNM(vTaskDimension, vEleIndex));

vEleIndex = vEleIndex - 1;
end;

#DIMENSIONDELETEALLELEMENTS( vTaskDimension );

DATASOURCENAMEFORSERVER =  pSourcefile;

vBindingsViewName = 'sm_task_bindings';
if ( ViewExists(vBindingCube, vBindingsViewName) > 0 );
ViewZeroOut(vBindingCube, vBindingsViewName);
endif;

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

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


vParentIX = 0;
if (vParent @= '');
dimensionelementinsert(vTaskDimension, '', vElement, 'N');
vLastAdded = vElement;

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

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

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
IF ( SUBST ( vSubset, 1, 6 ) @= 'CAMID(' );
  vPart1 = SUBST ( vSubset, 1, 6 ) | '"';
  vPart2 = SUBST ( vSubset, 7, LONG(vSubset) - 7 ) | '")';
  vSubset = vPart1 | vPart2;
ENDIF;

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

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


endif;
#attrputs(vSubset, vTaskDimension, vName, vGroup);
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,13

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

#Delete all task attachment blobs from server if the task has been removed
#The output file keeps all original task attachments
if  (FileExists(vOutputFile)=1);
ExecuteProcess('}sm_remove_task_attachments', 'pSourceFile',vOutputFile );
endif;




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