SubsetDestroy prompts error

Post Reply
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

SubsetDestroy prompts error

Post by bunchukokoy »

hi again!

I wonder why in my TI, this code.., prompts an error even though i already have deleted the cube view which used it.

============ at the bottom part of the Prolog

IF (ViewExists(CubeName, DestinationViewName)=1);
ViewDestroy(CubeName, DestinationViewName);
ENDIF;
============
============ at the Epilog

IF (SubsetExists(DimVersion, DestinationSubVersion)=1);
SubsetDestroy(DimVersion, DestinationSubVersion);
ENDIF;
=======

the scripts in the Epilog tab still prompts an error message.
Please help anyone.
Thanks!

bunchukokoy
Wim Gielis
MVP
Posts: 3241
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: SubsetDestroy prompts error

Post by Wim Gielis »

What error message do you see in the Message Log, and to what line of code is pointing?
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
Jeroen Eynikel
Community Contributor
Posts: 139
Joined: Mon Sep 15, 2008 1:45 pm

Re: SubsetDestroy prompts error

Post by Jeroen Eynikel »

- The subset may still be attached to another view. The problem here is that I have never found a way to easily identify such cases. Worst case it is attached to a private view of some user in which case you wouldn't even be able to see it.

=> Make a habit of cleaning any views / subsets used in TI process the moment you don't need them anymore. If possible create and delete them again in the same TI process.


- The view may still exist in memory even if you already deleted it. I have seen this happen in the following circumstances.

1: the view is open in SE.
2: try to do the destroy.
3: realize it fails because it was open
4: close the view
5: delete the view
6: subsets still won't delete. In this case unloading the cube from memory or restarting the service usually resolves the problem.
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Re: SubsetDestroy prompts error

Post by bunchukokoy »

Jeroen,

Thanks for the idea. But as I looked at my cubes, you are right, there was still a view which was using the subset. :lol:

bunchukokoy
Post Reply