I have a TI process that deletes the contents of a cube and reloads the data based on a CSV. The process worked until yesterday, when it failed immediately and gave me a "stack overflow error." I deleted the Feeder files and restarted my server hoping to clear up any corrupt Feeders. Now when I run the process it gets stuck indefinitely on the prolog's VIEWZEROOUT. I have replicated the prolog below.
I am not responsible for this cube or the ones it feeds, but the person who owns them insists no rules have changed. Any ideas would be greatly appreciated.
#=============================================================================================
#>>> DEFINE CUBES, VALUES AND DIMENSION ELEMENTS
#=============================================================================================
strCube = 'sunHFM_Comp_Emp_Info';
strScenario = 'Budget';
strZeroNew_g = UPPER( SUBST( TRIM( pZeroNew ), 1, 1 ) );
#==========================================
# DEACTIVATE EMP_INFO RULES
#==========================================
CELLPUTS('Y', '}SunControls', 'Value', 'DeActivate EmpInfo Rules - SUN');
#==========================================
# ZERO OUT ALL ADP DATA
#==========================================
cubFin = strCube;
vewRef = 'zzzSUNZeroOut';
SubRef = vewRef;
#-------------------------------------------------------
#>>> CREATE VIEW FOR ZEROOUT
#-------------------------------------------------------
IF (VIEWEXISTS (cubFin, vewRef) = 1);
VIEWDESTROY (cubFin, vewRef);
ENDIF;
VIEWCREATE (cubFin, vewRef);
#-------------------------------------------------------
#>>> CREATE ZEROOUT SUBSET IN SCENARIO DIMENSION
#-------------------------------------------------------
dimScenario = 'bpmScenario';
strElement = strScenario;
IF (SUBSETEXISTS (dimScenario, subRef) = 0);
SUBSETCREATE (dimScenario, subRef);
ENDIF;
SUBSETDELETEALLELEMENTS (dimScenario, subRef);
SUBSETELEMENTINSERT (dimScenario, subRef, strElement, 1);
VIEWSUBSETASSIGN (cubFin, vewRef, dimScenario, subRef);
#-------------------------------------------------------
#>>> CREATE ZEROOUT SUBSET IN INDEX DIMENSION
#-------------------------------------------------------
dimIndex = 'bpmStaff_Index';
#strElement = strScenario;
IF (SUBSETEXISTS (dimIndex, subRef) = 0);
SUBSETCREATE (dimIndex, subRef);
ENDIF;
SUBSETDELETEALLELEMENTS (dimIndex, subRef);
VIEWSUBSETASSIGN (cubFin, vewRef, dimIndex, subRef);
IF(strZeroNew_g @= 'Y');
strEle = 'Total Employees';
ELSE;
strEle = 'Total Existing';
ENDIF;
p = 1;
WHILE(p <= DIMSIZ(dimIndex));
strLoopEle = DIMNM(dimIndex, p);
IF(ELLEV(dimIndex, strLoopEle) = 0 & ELISANC(dimIndex, strEle, strLoopEle) <> 0);
SUBSETELEMENTINSERT(dimIndex, subRef, strLoopEle, SUBSETGETSIZE(dimIndex, subRef) + 1);
ENDIF;
p = p + 1;
END;
#-------------------------------------------------------
#>>> PERFORM THE ZERO OUT AND DELETE VIEW
#-------------------------------------------------------
VIEWZEROOUT (cubFin, vewRef);
VIEWDESTROY (cubFin, vewRef);
Process Stuck on Zero Out
-
- Posts: 36
- Joined: Fri Mar 10, 2017 8:26 pm
- OLAP Product: TM1
- Version: PA 2.0.8
- Excel Version: 2016
- Location: Dallas, TX
- gtonkin
- MVP
- Posts: 1202
- Joined: Thu May 06, 2010 3:03 pm
- OLAP Product: TM1
- Version: Latest and greatest
- Excel Version: Office 365 64-bit
- Location: JHB, South Africa
- Contact:
Re: Process Stuck on Zero Out
Note sure if it is getting unhappy here:
SUBSETELEMENTINSERT(dimIndex, subRef, strLoopEle, SUBSETGETSIZE(dimIndex, subRef) + 1);
may be worthwhile trying:
If memory serves, I remember the 0 index adds to the end but you will need to test.
Failing this, try adding some ASCIIOUTPUTs at various places e.g. before the loop, in the loop etc. and see what gets output.
Edit: you may also want to move:
VIEWSUBSETASSIGN (cubFin, vewRef, dimIndex, subRef);
to after the loop i.e. don't assign a blank subset to the view.
SUBSETELEMENTINSERT(dimIndex, subRef, strLoopEle, SUBSETGETSIZE(dimIndex, subRef) + 1);
may be worthwhile trying:
Code: Select all
SUBSETELEMENTINSERT(dimIndex, subRef, strLoopEle, 0);
Failing this, try adding some ASCIIOUTPUTs at various places e.g. before the loop, in the loop etc. and see what gets output.
Edit: you may also want to move:
VIEWSUBSETASSIGN (cubFin, vewRef, dimIndex, subRef);
to after the loop i.e. don't assign a blank subset to the view.
- jim wood
- Site Admin
- Posts: 3951
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Re: Process Stuck on Zero Out
You are correct adding at position 0 adds it as the last element in the dimension and much safer than using anything else.gtonkin wrote: ↑Fri May 04, 2018 7:19 pm Note sure if it is getting unhappy here:
SUBSETELEMENTINSERT(dimIndex, subRef, strLoopEle, SUBSETGETSIZE(dimIndex, subRef) + 1);
may be worthwhile trying:If memory serves, I remember the 0 index adds to the end but you will need to test.Code: Select all
SUBSETELEMENTINSERT(dimIndex, subRef, strLoopEle, 0);
Failing this, try adding some ASCIIOUTPUTs at various places e.g. before the loop, in the loop etc. and see what gets output.
Edit: you may also want to move:
VIEWSUBSETASSIGN (cubFin, vewRef, dimIndex, subRef);
to after the loop i.e. don't assign a blank subset to the view.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
-
- MVP
- Posts: 3120
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Process Stuck on Zero Out
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 36
- Joined: Fri Mar 10, 2017 8:26 pm
- OLAP Product: TM1
- Version: PA 2.0.8
- Excel Version: 2016
- Location: Dallas, TX
Re: Process Stuck on Zero Out
Thanks for your help, guys. It was actually a rule based value issue that was preventing the zero out. It works now.