Page 1 of 1
TI process hangs
Posted: Tue Mar 12, 2013 7:58 pm
by hunterforcognos
Hi experts,
I have written a TI script in order to create accounts dimension that consists of unbalanced hierarchy. I have attached details of my source files as well as various tabs of my TI process. I am able to save this process w/o any errors. However, my TM1 process and architect hangs when I try to execute this process. Can you please help me locate glitches in my code, if any?
Thanks in advance.
Re: TI process hangs
Posted: Tue Mar 12, 2013 8:23 pm
by tomok
Why do you have a WHILE loop in your Metatata tab? The code in the metadata tab executes once for each record encountered in the source, there is no need to put in a loop except in special circumstances. As long as vCOA3 is not equal to vCOA2 in the first record of the source you're forever in the first loop and the TI process continues to execute to infinity (or you kill it).
Re: TI process hangs
Posted: Tue Mar 12, 2013 8:48 pm
by hunterforcognos
Thanks for your response. That makes sense to me now.
What I am trying to do is to create an unbalanced hierarchy. My initial code consisted of only IF loops. The original code looked as follows:
IF (COA3 @<> COA2);
#Create a five level hierarchy and define parent / child relations
(Code for creating hierarchy and parent / child relations)
ELSEIF (COA3 @= COA2 and COA2 @<> COA1);
#Create a four level hierarchy and define parent / child relations
(Code for creating hierarchy and parent / child relations)
ELSE;
#Create a three level hierarchy and define parent / child relations
(Code for creating hierarchy and parent / child relations)
ENDIF;
But, when I tried to save this TI process, I got an error message saying that 'There is no equal sign after and'. So, I thought that 'and' clause may not be allowed within IF statement in TI process and hence, I changed my code.
I am new to TM1. So, can you please help?
Thanks again!
Re: TI process hangs
Posted: Tue Mar 12, 2013 8:53 pm
by declanr
hunterforcognos wrote:
ELSEIF (COA3 @= COA2 and COA2 @<> COA1);
But, when I tried to save this TI process, I got an error message saying that 'There is no equal sign after and'. So, I thought that 'and' clause may not be allowed within IF statement in TI process and hence, I changed my code.
I haven't looked at your actual process here but the error message you received was because "AND" is not the "AND" in TM1.
Try:
Code: Select all
ELSEIF ( ( COA3 @= COA2 ) & ( COA2 @<> COA1 ) );
HTH
Re: TI process hangs
Posted: Tue Mar 12, 2013 10:35 pm
by hunterforcognos
Ohh..as I said before, this is my first time with TM1. So, I did not know I should be using '&' and not 'and'..thanks a lot for your advice.
I changed my code to include IF statements with '&' clause. I was able to save the process without any errors. However, the TI process stops responding when I try to execute it.
Any ideas please?
Thanks!
Re: TI process hangs
Posted: Tue Mar 12, 2013 11:11 pm
by jstrygner
Very often process hangs like this if you use a WHILE loop but you forget to make sure process comes out of it (for example you forget to increment a counter or something like this).
Your original code had WHILE loops that for sure caused infinite looping.
Now you wrote you changed it to IFs, but I am not sure if in all required places.
Please re-paste here your current Metadata code (and other code if you also changed something on other tabs).
It should be easy then to investigate the reason of process being hanging.
Regards
Re: TI process hangs
Posted: Wed Mar 13, 2013 12:03 am
by hunterforcognos
Yes, sorry..should have pasted my new code before. I have only changed my metadata code. So, am copy pasting only metadata TI script here as attached. My TM1 process and architect continues to hang with this new code as well.
Please let me know your thoughts / comments.
Thanks!
Re: TI process hangs
Posted: Wed Mar 13, 2013 6:34 am
by Michel Zijlema
hunterforcognos wrote:Yes, sorry..should have pasted my new code before. I have only changed my metadata code. So, am copy pasting only metadata TI script here as attached. My TM1 process and architect continues to hang with this new code as well.
Please let me know your thoughts / comments.
Thanks!
Just a thought: you didn't publish your Data tab - is there any code on this tab? And if so, does this code f.i. contain the WHILE construct you used on the MetaData tab?
Michel
Re: TI process hangs
Posted: Thu Mar 14, 2013 8:31 pm
by hunterforcognos
Hi All,
Thanks a lot for all your quick responses. It was my very first post and am really surprised with the speed and quality of the responses.
In order to troubleshoot, I created a new TI with some sample files. Initially that would also hang my TM1 architect. But, I restarted my machine and created new processes using sample file and then, my actual file and that resolved the issue.
Again, thanks for all your help, advice and time.