0% found this document useful (0 votes)
12 views9 pages

GES Workshop - CM - Tester

GES Workshop - cm_tester

Uploaded by

haloj36372
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views9 pages

GES Workshop - CM - Tester

GES Workshop - cm_tester

Uploaded by

haloj36372
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Workshop : Use cm_tester to Extract the Model from the

Content Store
A Framework Manager project has been deleted and there is no backup. To help
recover the partial model, you will extract the model information from a package that
was published from this model and which is saved in the content store.
You will:

• Retrieve a list of all published packages.

• Extract model information from a package.

• Recreate the model.xml file in Notepad.


For more detailed information outlined as tasks, see the Task Table section.
For the final query results, see the Workshop Results section that follows the Task
Table section.

© 2010, IBM Corporation 1


IBM Confidential. For internal use only.
This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.
Workshop : Task Table

Retrieve a list of all published packages.


Where to Work Hints
Windows Explorer • Navigate to D:\Program Files\ibm\cognos\c10full\
webcontent.
cm_tester.htm • Choose Options and then test the connection to the
Content Manager using http://<computer
name>:9315/p2pd/servlet.

• Log on.

• Security Namespace - LDAP_ID

• Username - admin

• Password - Education1!
Extract model information from a package.
cm_tester.htm •
Notepad •
Recreate the model in Framework Manager.
Framework Manager •
Notepad •
Framework Manager •

If you need more information to complete a task, see the Step-by-Step instructions at
the end of the Workshop.

2 © 2010, IBM Corporation


IBM Confidential. For internal use only.
This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation..
Workshop : Workshop Results
After recreating the model in Framework Manager, the results appear as follows:

© 2010, IBM Corporation 3


IBM Confidential. For internal use only.
This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.
Workshop : Step-by-Step Instructions
Task 1. Retrieve a list of all published packages.
1. In Windows Explorer, navigate to D:\Program
Files\ibm\cognos\c10full\webcontent, and then double-click
cm_tester.htm.
2. Click Options.
3. In the Content Manager URL box, type http://<computer
name>:9315/p2pd/servlet, and then click Test.
The results appear as follows:

This indicates you can connect to the content store through Content Manager.
4. Click Close, click Close again, and then click Log on.
5. In the Security Namespace box, type LDAP_ID.

4 © 2010, IBM Corporation


IBM Confidential. For internal use only.
This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation..
6. In the Username box, type admin, in the Password box, type Education1!,
and then click Log On.
7. In the Choose a request template list, ensure that query is selected, and then
click Send.
8. Enter the following into the Enter value for #PATH# box, and then click
OK. This value will display the contents of the Public Folders > Samples >
Models path in IBM Cognos Connection.

/content/folder[@name='Samples']/folder[@name='Models']/*

9. Ensure that defaultName appears in the Enter value for #PROPERTY1#


box, and then click OK.
10. Ensure that searchPath appears in the Enter value for #PROPERTY2#
box, and then click OK.
11. Ensure that defaultName appears in the Enter value for #SORT_BY# box,
and then click OK.

In the response window, there are several folders and several packages under
the Public Folders > Samples > Models path. Folders will have an <item>
element that appears as <item xsi:type="cm:folder"> and packages will have an item
element that appears as <item xsi:type="cm:package">.

There were several packages returned in the response.

<item xsi:type="cm:package">
<defaultName xsi:type="cm:tokenProp">
<value xsi:type="xsd:string">GO Data Warehouse (analysis)</value>
</defaultName>

© 2010, IBM Corporation 5


IBM Confidential. For internal use only.
This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.
<item xsi:type="cm:package">
<defaultName xsi:type="cm:tokenProp">
<value xsi:type="xsd:string">GO Data Warehouse (query)</value>
</defaultName>

<item xsi:type="cm:package">
<defaultName xsi:type="cm:tokenProp">
<value xsi:type="xsd:string">GO Sales (analysis)</value>
</defaultName>

<item xsi:type="cm:package">
<defaultName xsi:type="cm:tokenProp">
<value xsi:type="xsd:string">GO Sales (query)</value>
</defaultName>

<item xsi:type="cm:folder">
<defaultName xsi:type="cm:tokenProp">
<value xsi:type="xsd:string">Interactive Samples</value>
</defaultName>

There are several more sections like this in the response. One is for the GO
Data Warehouse (query) package and the other is for the Samples folder.

Task 2. Extract model information from a package.


1. From the section for the GO Sales (query) package, copy the following:
/content/folder[@name='Samples']/folder[@name='Models']/package[@name=
'GO Sales (query)']
2. Click Send, and then answer the prompts as follows:
#PATH# = paste the contents of the clipboard, and then type /model
PROPERTY#1 = defaultName
PROPERTY#2 = model
SORTBY = defaultName

6 © 2010, IBM Corporation


IBM Confidential. For internal use only.
This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation..
The response window returns all the model information for the GO Sales
(query) package. The string &lt;project indicates the beginning of the model
information.

3. Scroll to the bottom of the response window to locate the string


&lt;/project&gt;.

If this was a versioned model there would be multiple instances of these project
tags. Preceding each set of project tags the model would be a section that looks
similar to the following,

<item xsi:type="cm:model">
<defaultName xsi:type="cm:tokenProp">
<value xsi:type="xsd:string">2010-02-22T04:11:47.358Z</value>
</defaultName>
<model xsi:type="cm:anyTypeMIMEProp">
<value xsi:type="xsd:string" xml:space="preserve">

The date-time value in the above identifies the versioned model. The latest
version of the model will have the latest date-time assigned to it. These values
can be useful in comparing changes between the published model versions.
When extracting a model using cm_tester, ensure that the contents of only one
set of project tags are included in the new model file.

Task 3. Recreate the model.xml file in Notepad++.


4. Copy everything from the &lt;project tag to the &lt;/project&gt; tag.
5. Open Notepad++ and then type the following:
<?xml version="1.0" encoding="UTF-8" ?>
6. Paste the contents of the clipboard.
7. Do a search and replace as follows:
Replace With

© 2010, IBM Corporation 7


IBM Confidential. For internal use only.
This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.
&lt; < (92779 occurrences)

&gt; > (92779 occurrences)

&amp; & (853 occurrences)

&amp;lt; < (117 occurrences)

&amp;gt; > (117 occurrences)

&amp;quot; “ (double quote)( 174 occurrences)

8. From the File menu, click Language, and then select XML. The XML
elements should now be in blue text and XML attributes should be in red text.
9. From the File menu, click Save, and then navigate to D:\Temp.
10. In the File name box, type model.xml and click Save.

Task 4. View the new model in Framework Manager


11. From the Start menu, point to All Programs > IBM Cognos 10 FM, and
then click Framework Manager.
12. Click Create a new project, leave the default name and location, and then click
OK.
13. Log on as admin/Education1!, select English, and then click OK.
14. Click Cancel, close Framework Manager, and then click Yes to saving
changes.

8 © 2010, IBM Corporation


IBM Confidential. For internal use only.
This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation..
15. In Windows Explorer, navigate to D:\Temp and then copy model.xml.
16. Navigate to D:\Program
Files\ibm\cognos\c10full\webcontent\samples\models\NewProject1,
paste model.xml, and then click Yes to replacing the file.
17. Open Framework Manager, and then under Recent Projects, click
NewProject1.
18. Log on as admin/Education1!.
The recreated model appears.
19. Expand the go_sales namespace.
The results appear as follows:

20. Close Framework Manager.

© 2010, IBM Corporation 9


IBM Confidential. For internal use only.
This guide contains proprietary information which is protected by copyright. No part of this document may be photocopied, reproduced,
or translated into another language without a legal license agreement from IBM Corporation.

You might also like