ProcessQuit Error

Post Reply
krithika331
Posts: 44
Joined: Thu May 01, 2014 12:46 pm
OLAP Product: Cognos TM1
Version: 10.2
Excel Version: 2010

ProcessQuit Error

Post by krithika331 »

TM1 Version 10.2.

In the TI process, the processQuit command executed correctly and the values got updated in the Cube as per the code. After the process is completed it throws an error and when I check the Error Log it shows an error of the child process used but the Log file error for the Child process is not present in the Error Logs. The values in the Cube are updated as expected but donot why the process is generating an error. I have searched the forums and used the Processbreak also but here the values are comming wrongly but I am not getting Error. Any ideas??

Thanks in Advance.
EvgenyT
Community Contributor
Posts: 324
Joined: Mon Jul 02, 2012 9:39 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: 2016
Location: Sydney, Australia

Re: ProcessQuit Error

Post by EvgenyT »

Hi there,

Obviously if TI throws an error then ProcessQuit is doing what its meant to do: terminates the process.

Post the TI code and error log for us to be able to help


Thanks
Last edited by EvgenyT on Tue May 06, 2014 2:14 am, edited 1 time in total.
dweebernot
Posts: 6
Joined: Wed Jan 08, 2014 4:47 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2007

Re: ProcessQuit Error

Post by dweebernot »

If you are using a process quit as part of your code, the process quits and displays an error. If you use a Process break, the process will still run the epilog and complete without an error. Please specify, your code and at which tab the process quit/break is used.
krithika331
Posts: 44
Joined: Thu May 01, 2014 12:46 pm
OLAP Product: Cognos TM1
Version: 10.2
Excel Version: 2010

Re: ProcessQuit Error

Post by krithika331 »

Hi Everyone,

I have two Processes (Process1, Process2) which are required to calculate the YTD value for a measure. The measure dimension has the elements Measure1, YTD_Measure1. The Date dimension has the structure ( Year -> Month -> WeekDate). Process1 will calculate the YTD for the current period. If the date is not the first period (Day number=1) , it will pick the prior period YTD value and adds to the Current period measure value ( achieved by process2 , which is called in Process in epilog) and displays the YTD for the current Period. If the date is the first period, then Process2 is executed and processquit happens. So I am using the ProcessQuit funtion in the Prolog of Process1. The YTD values are getting updated correctly, but it throws the error after the process is completed. In the Error logs, there is no log file which details about the error. When I use the Processbreak instead of ProcessQuit, I don't get the error but the value gets doubled for the first period because the process2 is called in Epilog. I cannot use the Processbreak function because my logic will double the value. Any idea how to overcome the problem of ProcessQuit. The calculation of logic is working correctly but threws the error. I am looking for an Error free code. Any ideas??


Thanks in Advacne
dan.kelleher
Community Contributor
Posts: 128
Joined: Wed Oct 14, 2009 7:46 am
OLAP Product: TM1
Version: 9.4
Excel Version: 11
Location: London

Re: ProcessQuit Error

Post by dan.kelleher »

Hi,

Firstly, may I ask why you are calculating your YTD as part of a TI process? This is something that is done really easily using consolidations in your time dimension (simplified to months in the example below):

2014_04_YTD (Consolidation)
2014_01 (weight 1)
2014_02 (weight 1)
2014_03 (weight 1)
2014_04 (weight 1)

If you wanted to show this as a separate measure, I would then use rules to transpose it across to your measures dimension:

Code: Select all

['YTD_Measure1'] = 
DB('cube', dim1, dim2, ..., !time | '_YTD', 'Measure1'); 
If you do decide to do this in a process, you can use IF statements and a flag variable to control what sections of code gets executed. Do you even need 2 processes?
krithika331
Posts: 44
Joined: Thu May 01, 2014 12:46 pm
OLAP Product: Cognos TM1
Version: 10.2
Excel Version: 2010

Re: ProcessQuit Error

Post by krithika331 »

Thanks for the reply.

Actually I need to show YTD as a separate measure and want to do it through the TI process. I have used the IF statement in applying the logic. How does the flag variable control the section of the code. Can you please tell me.

Below is what used:

IF ( ATTRS ( 'yDate', x, 'DayNo' ) @='1' );
ExecuteProcess ( 'Process2, 'x', x );
ProcessQuit;
ELSE;
period_bf= ATTRS ( 'yDate', x, 'Period_last' );
SubsetElementInsert ( 'ydate', 'datesubset1', period_bf, 1 );
ENDIF;



Thanks in advance
dan.kelleher
Community Contributor
Posts: 128
Joined: Wed Oct 14, 2009 7:46 am
OLAP Product: TM1
Version: 9.4
Excel Version: 11
Location: London

Re: ProcessQuit Error

Post by dan.kelleher »

Maybe I'm misunderstanding what you're trying to do but something like the below may suffice:


IF ( ATTRS ( 'yDate', x, 'DayNo' ) @='1' );
ExecuteProcess ( 'Process2, 'x', x );
vnRunProcess2 = 0;
ELSE;
period_bf= ATTRS ( 'yDate', x, 'Period_last' );
SubsetElementInsert ( 'ydate', 'datesubset1', period_bf, 1 );
vnRunProcess2 = 1;
ENDIF;


# And in the epilog

If(vnRunProcess2 = 1);
ExecuteProcess(...);
EndIf;
Post Reply