Created On:  18 May 2011

Problem:

When generating a Call Map diagram for an application with multiple levels of XCTL, the diagram generated only shows the detail to 1 level.  How can the depth (weight) of any diagram be changed in Modernization Workbench?

Resolution:

During this explanation, we are going to use a customized version of the CallMap scope, specifically named NEWCallMap.

- open diagrammer

- From the SCOPE menu choose SCOPE EDITOR

- Highlight "CALL MAP" in the Left Hand Pane

- From the FILE menu, choose COPY

- Rename the scope to NEWCallMap (This is case sensitive from here on), change the CAPTION so it can be identified in the left hand pane, click on SAVE

- Double click on the NEWCallMap scope in the left hand pane, and the details will be displayed in the right hand pane.

-   In the right hand pane, click on Hide Unused.  The display will only show the relationships used in the diagram. 
Click on the column heading for "Relationship Name", then scroll down to the bottom.
Note:- ther are some entries around XCTL relationships. (See attached diagram1.jpg)

-  Scroll to the right as far as possible, where the field WEIGHT is visible. 
   This is the field that needs to be changed, the default is set to 1.  (See attached diagram2.jpg)

- Close diagrammer.

The only way to currently change the WEIGHT value is by using the attached SQL scripts.

- Unload the attached SQL scripts into any directory.
 (make this directory non spacey as SQLPLUS doesn't like spacey directories)

-  Open the attached CallMapSelect.SQL in notepad.
   The name of the new scope is in the SQL (NEWCallMap) and is case sensitive.

 SELECT A."Name" , C."Name", B."Weight"
 FROM DGRSCOPE A, DGRSCOPEUSESREL B, DGRSCOPERELS C
 WHERE A."ID" = B."ScopeID"
 AND B."RelID" = C."ID"
 AND A."Name" ='NEWCallMap'
 AND C."Name" LIKE '%Xctl%';

-  Open the attached CallMapWeightUpdate.SQL in notepad.
   The name of the new scope is in the SQL (NEWCallMap) and is case sensitive.

 UPDATE DGRSCOPEUSESREL B
    SET B."Weight" = '1'        <- This is the weight that needs to be changed ->
    WHERE B."ScopeID" =
       (SELECT A."ID" 
        FROM DGRSCOPE A
        WHERE A."Name" ='NEWCallMap')
    AND B."RelID" IN  
       (SELECT C."ID" 
        FROM DGRSCOPERELS C
        WHERE C."Name" LIKE '%Xctl%');
 COMMIT;

-  Edit the CallMapWeightUpdate SQL to change the value set for WEIGHT.  It is currently set to 4, which may not be enough to cover all levels of the XCTL in the application.  Remember to save the file.

- Open a DOS command and navigate to the directory used earlier to save the SQL scripts.

- start SQLPLUS.

- When prompted, enter the user ID that owns ythe workspace.  
   For example :-  RMWUSER3, with the password the same as the user ID.

(Note : -  It is expected that the workspace owner is already known without running this query, but if necessary, the following query can be run in SQLPLUS, (remember that Oracle is case sensitive) to verify the correct owner/workspace ID.)

 SELECT "Name", "Value" FROM WORKSPACESETTINGS
  WHERE "Name" = 'WorkspaceDir';

-  Run the CallMapSelect.SQL script in SQLPLUS, just type START CallMapSelect and press enter. 
The results will show the rows that are about to be changed. There should be 2 or maybe 3 but no more.

- Now run the CallMapWeightUpdate script in SQLPLUS, just type START CallMapWeightUpdate and press enter. 
This will update the database with the WEIGHT value specified for the XCTL relationship rows, for the NEWCallMap scope.
To verify the changes made, run the CallMapSelect.SQL script again.

- Close SQLPLUS.

- Re-open diagrammer.

- Generate the diagram using scope NEWCallMap.

This should generate the depth in the XCTL calls as requested.
Incident# 2513816