IBM Business Analytics Proven Practices

Resetting All Persisted Views for an IBM Cognos TM1 Application

Product(s): IBM Cognos TM1 10.2; Area of Interest: Financial Management

Comments

Content series:

This content is part # of # in the series: IBM Business Analytics Proven Practices

Stay tuned for additional content in this series.

This content is part of the series:IBM Business Analytics Proven Practices

Stay tuned for additional content in this series.

Purpose

This document will provide tips on re-oriented cube views and charting options across various IBM Cognos TM1 applications.

Applicability

IBM Cognos TM1 10.2 and IBM Cognos TM1 10.2.2

Exclusions and Exceptions

There are no known exceptions and exclusions at the time this document was created.

Assumptions

The approach describe in this document is geared to TM1 model builders. The document will assume TM1 model builders are familiar with cube views and/or charting functionality within IBM Cognos TM1.

Re-setting all the persisted views for an IBM Cognos TM1 application

Background information

The IBM Cognos TM1 Application Web client has a feature that persists the orientation of cube views and charting options across sessions. This means that a user can re-orient their grid, select any of the charting options, close IBM Cognos TM1 Application Web, and then return to their application later on and see the same presentation.

Users can choose to return to the default view orientation using the Reset View menu item in TM1 Application Web as shown in Figure 1.

Figure 1. The Reset View menu option
Figure 1 – The Reset View menu option
Figure 1 – The Reset View menu option

However, there are times where an IBM Cognos TM1 Administrator needs to be able to reset the views for all users of the application at various points in the planning cycle to ensure that all users are returned to the default view. There is currently no in-built mechanism for doing this.

Solution

The persistence of the user’s chosen orientation is achieved by the creation of private views that are stored in the IBM Cognos TM1 server data directory. The private views are created in a sub-folder that follows the user’s name and the name of the relevant cube. IBM Cognos TM1 Application Web also creates files with a .blb extension that store information on the charting options being used for a particular view. These files are usually stored in the root of the IBM Cognos TM1 data directory, and not in the user-specific path.

An IBM Cognos TM1 application is given a unique identifier known as a GUID. The GUID can be found in the URL of the IBM Cognos TM1 application’s workflow page. Figure 2 shows this URL containing the a GUID of {8a808556-0604-462d-8471-cbc5a22573bc}. Note that some GUIDs are enclosed in curly brace characters and others are not.

Figure 2. A TM1 application GUID in a URL
Figure 2 – A TM1 application GUID in a URL
Figure 2 – A TM1 application GUID in a URL

The private views and .blb files related to an IBM Cognos TM1 application also contain the application’s GUID. Figure 3 shows the GUID used in the file name of a private view that has been created for the Cambridge node of the Staff Plan cube for user Jones and it relates to the IBM Cognos TM1 Application whose unique identifier is {8a808556-0604-462d-8471-cbc5a22573bc}.

Figure 3. The GUID used in the filename for a private view
Figure 3 – The GUID used in the filename for a private view
Figure 3 – The GUID used in the filename for a private view

Additionally, a .blb file relating to the charting options selected by user Jones for the Staff Plan view has been placed in the root of the IBM Cognos TM1 data directory. Figure 4 shows the GUID being used in the various components of the .blb file name.

Figure 4. The GUID used in the filename for a .blb file
Figure 4 – The GUID used in the filename for a .blb file
Figure 4 – The GUID used in the filename for a .blb file

The scripts that will be presented below can be executed from the command line, to first find any private view files and .blb files matching a given unique identifier, and second to delete the files that were found. Before using these scripts, please note the following:

  • Before these scripts are executed on any IBM Cognos TM1 system, the IBM Cognos TM1 Administrator must ensure that the IBM Cognos TM1 database is backed up.
  • All users should be logged out of the system. If users are not logged out when the deletion script is run, then the private views will be persisted when the user re-opens the IBM Cognos TM1 Application Web client, even if it appears that the .vue files have been successfully deleted.
  • The script to list the files to be deleted should be run and the results carefully verified before the corresponding script to delete the private views is run.
  • The IBM Cognos TM1 Application Server uses .blb files to store information concerning the IBM Cognos TM1 applications within your environment. Be careful not to delete any of these files in error. Additional documentation on working with BLOB Files can be found in the developerWorks article Working With Blob Files and IBM Cognos TM1 referenced in the Related topics section at the end of this article.

Script to find relevant private view and blb files

Enter the following commands into a text file and name it FindPrivateViews.cmd.

dir %1\%2.blb /s /b | sort /R > "%3"
dir %1\%2.vue /s /b | sort /R >> "%3"

To obtain a list of the targeted files that you can review, open a command prompt, browse to the location of this file and then run it, providing the 3 necessary parameters as follows:

FindPrivateViews <TM1 server path> *[}tp_tasks}{8a808556-0604-462d-8471-cbc5a22573bc* PrivateViews.txt
  • <TM1 server path> is the location of your IBM Cognos TM1 server data directory, enclosed in double quotes if it contains spaces.
  • *[}tp_tasks}{8a808556-0604-462d-8471-cbc5a22573bc* is the wildcard search string that looks for objects with the relevant Application GUID
  • PrivateViews.txt is the output file containing the list of .vue and .blb files that are found. It is written to the same directory as the FindPrivateViews.cmd file. Please ensure you have review the contents of PrivateViews.txt to ensure that you have identified only the correct views.

Note that it is important to prefix the wildcard search parameter (the second argument passed to the batch file) with [}tp_tasks}.

Script to delete relevant private views and blb files

Enter the following two lines into a text file and name it DeletePrivateViews.cmd.

for /f "usebackq delims=" %%f in (`"dir %1\%2.vue /s /b | sort /R"`) do del /p "%%f"
for /f "usebackq delims=" %%f in (`"dir %1\%2.blb /s /b | sort /R"`) do del /p "%%f"

Only execute this script once you have verified the list of files that you output previously. Execute it with first parameter being the IBM Cognos TM1 server path and the second parameter the wildcard representing the IBM Cognos TM1 Application GUID:

DeletePrivateViews <TM1 server path> *[}tp_tasks}{8a808556-0604-462d-8471-cbc5a22573bc*

By default, this script will prompt you before deleting each of the files it finds. If you have very many files and you do not wish to be prompted, you may remove the /p switch from the del functions in the script.


Downloadable resources


Related topic


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Big data and analytics
ArticleID=994288
ArticleTitle=IBM Business Analytics Proven Practices: Resetting All Persisted Views for an IBM Cognos TM1 Application
publish-date=01022015