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,12
pVersion
pName
pTemplate
pPlan
pStatus
pNotes
pStart
pDue
pCopyType
pSecuritySetting
pAddAdminGroup
pSupportVersionAttachments
561,12
2
2
2
2
2
2
2
2
2
2
2
2
590,12
pVersion,""
pName,""
pTemplate,""
pPlan,""
pStatus,""
pNotes,""
pStart,""
pDue,""
pCopyType,"TEMPLATE"
pSecuritySetting,""
pAddAdminGroup,"N"
pSupportVersionAttachments,"N"
637,12
pVersion,New Version
pName,Name
pTemplate,Template
pPlan,Plan
pStatus,Status
pNotes,Notes
pStart,Start Date
pDue,Due Date
pCopyType,Copy Type (Template
pSecuritySetting,Security Setting
pAddAdminGroup,AdminGroup Access
pSupportVersionAttachments,Support Version Attachments
577,0
578,0
579,0
580,0
581,0
582,1
IgnoredInputVarName=V1	VarType=32	ColType=1165	
572,109

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

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


vPlanDimension = vObjectPrefix | 'sm_plans';
vDimIX = DIMIX(vPlanDimension, pPlan);

if (vDimIX = 0);
processquit;
endif;

vVersionDimension = vObjectPrefix | 'sm_versions' | vObjectSeparator | pPlan;
vDimIX = DIMIX(vVersionDimension, pVersion);

if (vDimIX > 0);
processquit;
endif;

vDimSiz = DIMSIZ(vVersionDimension);
dimensionelementinsert(vVersionDimension, '', pVersion, 'N');
AttrInsert(vVersionDimension , '', 'Support Task Attachments', 'S');

vCustVersionIX = DIMIX(pPlan, pVersion);
if (vCustVersionIX = 0);
dimensionelementinsert(pPlan, '', pVersion, 'N');
endif;

vDimIX = DIMIX(vVersionDimension, pVersion);
if (vDimIX = 0);
processquit;
endif;


vTaskDimension = vObjectPrefix | 'sm_versiontasks'  | vObjectSeparator | pPlan  | vObjectSeparator | pVersion;
dimensioncreate(vTaskDimension);


pExistingTemplate = pTemplate;
if (pExistingTemplate @<> '');
if (pCopyType @= 'TEMPLATE');
vExistingDimension = vObjectPrefix | 'sm_templatetasks'  | vObjectSeparator | pExistingTemplate;
elseif (pCopyType @= 'VERSION');
vExistingDimension = vObjectPrefix | 'sm_versiontasks'   | vObjectSeparator | pPlan | vObjectSeparator | pExistingTemplate;
endif;
endif;

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;

vAttributeDim = '}sm_control_task_attributes';
vAttributeSubset = 'sm_version_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;

vTaskDimension = vObjectPrefix | 'sm_versiontasks'  | vObjectSeparator | pPlan  | vObjectSeparator | pVersion;
vBindingCube = vObjectPrefix | 'sm_versionbindings'  | vObjectSeparator | pPlan  | vObjectSeparator | pVersion;
vBindingMeasures = vObjectPrefix | 'sm_binding_measures' ;
vDimensions = '}dimensions';
CUBECREATE( vBindingCube, vDimensions, vTaskDimension, vBindingMeasures);

vBindingsView = 'sm_task_bindings';
VIEWCREATE(vBindingCube, vBindingsView);
ViewSetSkipZeroes(vBindingCube, vBindingsView, 1);
VIEWROWDIMENSIONSET(vBindingCube, vBindingsView, vDimensions, 1);
VIEWROWDIMENSIONSET(vBindingCube, vBindingsView, vTaskDimension, 2);
VIEWCOLUMNDIMENSIONSET(vBindingCube, vBindingsView, vBindingMeasures, 1);

573,42

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


if (pExistingTemplate @<> '');
vDimSize = DIMSIZ(vExistingDimension);
vIndex = 1;
while (vIndex <= vDimSize);
vElement = DIMNM(vExistingDimension, vIndex);


DIMENSIONELEMENTINSERT(vTaskDimension, '', vElement, 'N');
vIndex = vIndex + 1;
end;

vTaskSize = DIMSIZ(vTaskDimension);

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

vSourceDimension = vExistingDimension;
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,46

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

if (pName @<> '');
attrputs(pName, vVersionDimension, pVersion, 'Version');
endif;
if (pTemplate @<> '');
attrputs(pTemplate, vVersionDimension, pVersion, 'Template');
endif;
attrputs(pStatus, vVersionDimension, pVersion, 'Status');
attrputs(pNotes, vVersionDimension, pVersion, 'Notes');
attrputs(pStart, vVersionDimension, pVersion, 'Start Date');
attrputs(pDue, vVersionDimension, pVersion, 'Due Date');
attrputs(pSecuritySetting, vVersionDimension, pVersion, 'Security Setting');
attrputs(pAddAdminGroup, vVersionDimension, pVersion, 'Add AdminGroup');
attrputs(pSupportVersionAttachments, vVersionDimension, pVersion, 'Support Task Attachments');



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

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



vAttributesView = 'sm_task_attributes';
vAttributesCube = '}ElementAttributes_' | vObjectPrefix | 'sm_versiontasks'  | vObjectSeparator | pPlan | vObjectSeparator | pVersion;

VIEWCREATE(vAttributesCube, vAttributesView);
ViewSetSkipZeroes(vAttributesCube, vAttributesView, 1);
VIEWROWDIMENSIONSET(vAttributesCube, vAttributesView,vTaskDimension, 1);
VIEWCOLUMNDIMENSIONSET(vAttributesCube, vAttributesView, vAttributesCube, 2);


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,
