CMS Snapshot Analysis - Information - How to check on and create links between application module and technology

Purpose

This page provides assistance on checking links between application, module and technology and then creating the links if they do not exist.

Please see the image below which shows an example of links which should be in place:

Basically there should be a link between the application and the functional module, the application and the technology, the functional module and the technology, and between the technologies themselves.

The numbers in the image show the value of the link_type_id field that should be in place for each of these links in the dss_link and dss_link_info tables.

Applicable CAST Version

ReleaseYes/No
8.3.x

Applicable RDBMS

RDBMSYes/No
CSS

Details

  • First check for the links between the application and the functional module by first running the following query on the central database.

SELECT * FROM dss_objects WHERE object_type_id=-102;


  This will normally return something like this where the first column is the application id (in this case 3):

  ```sql
3;-102;"APP1";"";"APP1"

SELECT O.OBJECT_ID  FROM DSS_LINK_INFO L JOIN DSS_OBJECTS O ON O.OBJECT_ID = L.NEXT_OBJECT_ID WHERE L.PREVIOUS_OBJECT_ID = 3 – Application id AND L.LINK_TYPE_ID = 0 – Application Functional Module AND L.SNAPSHOT_ID = <snapshot_id>;


  If this returns a value, then the links is there.  If not, then:

  - Run the following query on the central database:

    ```sql
SELECT *
FROM   dss_objects
WHERE  object_type_id=20000;
This will normally return something like this where the first column is the module id - the functional module we are looking for in this case is the one with union content (in this case 4):

```sql

4;20000;"APP1 union content";"";"APP1 union content"

5;20000;“MOD1”;"";”MOD1"

  - Next, create the link by using the object\_ids of the application and the application functional module with the following command (3 and 4 in our case;  order is important – the object\_id of the application should be first):

    ```sql
SELECT DSS_CREATE_LINK(3,4,0,1); -- (<object_id of application>, <object_id of functional module>, 0, 1)
There's no significant value returned by this query.

SELECT * FROM DSS_LINK_INFO L JOIN DSS_OBJECTS O ON O.OBJECT_ID = L.NEXT_OBJECT_ID WHERE L.PREVIOUS_OBJECT_ID = 3 – Application id AND L.LINK_TYPE_ID = 2 – technologies AND L.SNAPSHOT_ID = <snapshot_id>;


  This will normally return something like where the application object\_id for the technology is the fifth column:

  ```sql
1;3;50518;2;50518;1101000;"SQL";"Technologic SQL object";"SQL"
1;3;50519;2;50519;-4;"Cobol";"Technologic Cobol object";"Cobol"

SELECT * FROM DSS_LINK_INFO L JOIN DSS_OBJECTS O ON O.OBJECT_ID = L.NEXT_OBJECT_ID WHERE L.PREVIOUS_OBJECT_ID = 4 – Functional Module id AND L.LINK_TYPE_ID = 2 – technologies AND L.SNAPSHOT_ID = <snapshot_id>;


  This will normally return something like where the module object\_id for the technology is the fifth column

  ```sql
1;4;50506;2;50506;1101000;"SQL";"Technologic SQL object";"SQL"
1;4;50507;2;50507;-4;"Cobol";"Technologic Cobol object";"Cobol"

SELECT * FROM DSS_LINK_INFO L JOIN DSS_OBJECTS O ON O.OBJECT_ID = L.NEXT_OBJECT_ID WHERE L.PREVIOUS_OBJECT_ID = 50518 – Application technology Id AND L.NEXT_OBJECT_ID = 50506 – Module technology Id AND L.LINK_TYPE_ID = 0 AND L.SNAPSHOT_ID = <snapshot_id>;

- If this query returns a result, then the link is there.  if it does not, then create it with the following query

  ```sql
SELECT DSS_CREATE_LINK(50518,50506,0,1); -- (<application object_id for the technology>, <module object_id for the technology>, 0, 1)

There’s no significant value returned by this query.

Notes/comments

Related Pages