TI process hangs

Post Reply
hunterforcognos
Posts: 15
Joined: Fri Mar 08, 2013 9:06 pm
OLAP Product: TM1, Transformer
Version: 10.1.1
Excel Version: 2013

TI process hangs

Post 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.
Attachments
AccountsTIDoubt.docx
(217.05 KiB) Downloaded 455 times
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: TI process hangs

Post 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).
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
hunterforcognos
Posts: 15
Joined: Fri Mar 08, 2013 9:06 pm
OLAP Product: TM1, Transformer
Version: 10.1.1
Excel Version: 2013

Re: TI process hangs

Post 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!
declanr
MVP
Posts: 1828
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: TI process hangs

Post 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
Declan Rodger
hunterforcognos
Posts: 15
Joined: Fri Mar 08, 2013 9:06 pm
OLAP Product: TM1, Transformer
Version: 10.1.1
Excel Version: 2013

Re: TI process hangs

Post 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!
jstrygner
MVP
Posts: 195
Joined: Wed Jul 22, 2009 10:35 pm
OLAP Product: TM1
Version: 9.5.2 FP3
Excel Version: 2010

Re: TI process hangs

Post 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
hunterforcognos
Posts: 15
Joined: Fri Mar 08, 2013 9:06 pm
OLAP Product: TM1, Transformer
Version: 10.1.1
Excel Version: 2013

Re: TI process hangs

Post 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!
Attachments
AccountsTI.PNG
AccountsTI.PNG (44.81 KiB) Viewed 7093 times
User avatar
Michel Zijlema
Site Admin
Posts: 712
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: TI process hangs

Post 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
hunterforcognos
Posts: 15
Joined: Fri Mar 08, 2013 9:06 pm
OLAP Product: TM1, Transformer
Version: 10.1.1
Excel Version: 2013

Re: TI process hangs

Post 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.
Post Reply