601,100
562,"SUBSET"
586,"}sm_controls"
585,"}sm_controls"
564,
565,"hdlITYA=aXVZ0>^Uf9^=h95`T[?@`mW@^D@dP1qeGChysxRHEG^t7rOzUyu44xJl@N209kEc1Lwprgy]sfWi2XKu^Ei>BVa\rTR;[AlP@TDNto7c=\gHQNj1xKdMbbhfxP6f\lY=>;q[i@pyQ32[UQ^I;1cP@6vjuNVyhqFvXOhlwCWf\:;au\xNR\bkOj0^47p]Uz]>"
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,8
pTemplate
pDimension
pSubset
pExistingTemplate
pLoadType
pAliasName
pObjectType
pPlan
561,8
2
2
2
2
2
2
2
2
590,8
pTemplate,""
pDimension,""
pSubset,""
pExistingTemplate,""
pLoadType,"SUBSET"
pAliasName,""
pObjectType,""
pPlan,""
637,8
pTemplate,Template
pDimension,Source Dimension
pSubset,Source Subset
pExistingTemplate,Existing Template
pLoadType,Load Type
pAliasName,Alias Name
pObjectType,lias Name
pPlan,Type
577,0
578,0
579,0
580,0
581,0
582,1
IgnoredInputVarName=V1	VarType=32	ColType=1165	
572,7

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****




573,133

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****



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


if (pObjectType @= 'VERSION');
vTaskDimension = vObjectPrefix | 'sm_versiontasks' | vObjectSeparator | pPlan  | vObjectSeparator | pTemplate;

elseif (pObjectType @= 'WIZARD');
vTaskDimension = vObjectPrefix | pTemplate;
dimensioncreate(vTaskDimension);

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;

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



bFixHierarchy = 0;

if (pLoadType @= 'SUBSET');

if (pDimension @<> '' & pSubset @<> '');
vExistingDimension = pDimension;
vDimSize = SUBSETGETSIZE(vExistingDimension, pSubset);
vIndex = 1;
while (vIndex <= vDimSize);
vElement = SUBSETGETELEMENTNAME(vExistingDimension, pSubset, vIndex);
if (ELCOMPN(vExistingDimension, vElement) > 0);
DIMENSIONELEMENTINSERT(vTaskDimension, '', vElement, 'C');
else;
DIMENSIONELEMENTINSERT(vTaskDimension, '', vElement, 'N');
endif;

vGroup = '}' | 'smt_' | pTemplate | '_' | vElement;
#ADDGROUP(vGroup);

vIndex = vIndex + 1;
end;
bFixHierarchy = 1;
endif;

elseif (pLoadType @= 'TEMPLATE');

if (pExistingTemplate @<> '');
vExistingDimension = vObjectPrefix | 'sm_templatetasks'  | vObjectSeparator | pExistingTemplate;
vDimSize = DIMSIZ(vExistingDimension);
vIndex = 1;
while (vIndex <= vDimSize);
vElement = DIMNM(vExistingDimension, vIndex);
DIMENSIONELEMENTINSERT(vTaskDimension, '', vElement, 'N');
vIndex = vIndex + 1;
end;
bFixHierarchy = 1;

endif;

elseif (pLoadType @= 'ELEMENT');


endif;

vSourceDimension = '';
bFixHierarchy = 0;

if (pLoadType @= 'SUBSET');

vSourceDimension = pDimension;
bFixHierarchy = 1;

elseif (pLoadType @= 'TEMPLATE');

vSourceDimension = vExistingDimension;
bFixHierarchy = 1;


endif;

if (bFixHierarchy = 1);
vTaskSize = DIMSIZ(vTaskDimension);

vTaskIndex = 1;
while (vTaskIndex <= vTaskSize);
vTaskElement = DIMNM(vTaskDimension, vTaskIndex);

vCheckIndex = 1;
while (vCheckIndex <= vTaskSize);

if (vCheckIndex <> vTaskIndex);
vCheckElement = DIMNM(vTaskDimension, vCheckIndex);

if (ELISCOMP(vSourceDimension, vCheckElement, vTaskElement) = 1);

DimensionElementComponentAdd(vTaskDimension, vTaskElement, vCheckElement, 1);
endif;
endif;

vCheckIndex = vCheckIndex + 1;
end;
vTaskIndex = vTaskIndex + 1;
end;

endif;


574,3

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****
575,51

#****GENERATED STATEMENTS START****
#****GENERATED STATEMENTS FINISH****

vSourceDimension = '';
bFixHierarchy = 0;

if (pLoadType @= 'SUBSET');

vSourceDimension = pDimension;
bFixHierarchy = 1;

vDimSize = DIMSIZ(vTaskDimension);
vIndex = 1;
while (vIndex <= vDimSize);
vElement = DIMNM(vTaskDimension, vIndex);
ATTRPUTS(pDimension, vTaskDimension, vElement, 'dimension1');
ATTRPUTS(pSubset, vTaskDimension, vElement, 'subset1');
ATTRPUTS(vElement, vTaskDimension, vElement, 'element1');
ATTRPUTS(ATTRS(vSourceDimension, vElement, pAliasName), vTaskDimension, vElement, 'task');
ATTRPUTS(ATTRS(vSourceDimension, vElement, pAliasName), vTaskDimension, vElement, 'Name');
vGroup = '}' | 'smt_' | pTemplate | '_' | vElement;
#ATTRPUTS(vGroup, vTaskDimension, vElement, 'Owner Group');
vIndex = vIndex + 1;
end;
#SECURITYREFRESH;

elseif (pLoadType @= 'TEMPLATE');

vSourceDimension = vExistingDimension;
bFixHierarchy = 1;

vDimSize = DIMSIZ(vTaskDimension);
vAttrSize = DIMSIZ('}ElementAttributes_' | vTaskDimension);

vIndex = 1;
while (vIndex <= vDimSize);
vElement = DIMNM(vTaskDimension, vIndex);
vAttrIndex = 1;
while (vAttrIndex <= vAttrSize);
vAttr = DIMNM('}ElementAttributes_' | vTaskDimension, vAttrIndex);
ATTRPUTS(ATTRS(vExistingDimension, vElement, vAttr), vTaskDimension, vElement, vAttr);
vAttrIndex = vAttrIndex + 1;
end;

vIndex = vIndex + 1;
end;

endif;


576,CubeAction=1511	DataAction=1503	CubeLogChanges=0	
638,1
804,0
900,
901,
902,
903,
906,
907,
908,
904,0
905,0
909,0
910,0
911,
912,
913,
914,
915,
916,
