Use Repository Dialog

You can see a list of repository dialogs (or metadata models) when you click the Repository tab available on the home page. The dialog appears in a tabular form displaying a list of objects. You can perform data modification task for repository objects. However, you need to have the necessary rights on repository dialog to be able to perform the data modification tasks; as right to log on to the application server and right to update repository dialogs are different.

To view repository object types and object attributes

  1. Click Repository on the home page.
  2. The Repository Dialog page appears displaying a list of dialogs.
  3. Select a dialog and click View Types.

    A list of object types associated with the selected dialog appears in a tabular form.

  4. Select the object types.
  5. Click Show Attribute to view object attributes.

    The object attributes are displayed on the Repository Objects page. the page also allows you to perform the following tasks on repository objects :

    1. Search Repository—by clicking the Search button
    2. Insert—by clicking the Insert button
    3. Delete—by clicking the Delete button
    4. Clear field values—by clicking the Clear All button

Important! You can perform data modification tasks for repository objects ONLY when you have the following rights on repository dialog:

Pre-Conditions for using Repository Tables

While working with repository objects, you are also interacting with the underlying repository tables; and these tables enforce some pre-conditions that should be satisfied. The CA Repository for Webstation Option allows you to view the repository object entities, attributes and make any required changes to the exiting objects.

This section explains the mechanism to generate following sample illustration: This screen capture displays the repository objects and their attributesThe following section describes how you can generate the information pertaining to the following specific information:

  1. Dialog and Type combination
  2. Header Information's
  3. Individual Header contents and X Attributes
  4. Code tables

Dialog and Type Combination

The repository dialog types display requires the following pre-conditions:

  1. The user should have entry in TSO_LOGON column of DBX_PRIV_USER table.
  2. The column name PRIV_NAME of DBX_PRIV_USER table should match with the value of PRIV_NAME in DBX_DIALOG_PRIV table.

Example:

Header Information with X Attributes

The pre-condition to fetch the header information is as follows:

The following query returns the Header names to be displayed along with the screen row positions.

Select v_literal, screen_row_pos from RZOZ722.DBX_SCREEN_LIT where col = 2 and hilite = 'Y' and map_id IN (Select map_id from RZOZ722.dbx_dialog where dialog = 'SHOPCNTL' and ent_type = 25136) order by screen_row_pos

The result will be used to generate the UI screen of display page and XSD.

The following illustration displays the result set:

This is a reult set for obtaining the Header information.

Individual Header Contents and X Attributes

This section describes the queries along with the result set that are used to generate the XSD schema for a repository objects.

  1. The query to fetch Individual Header contents is as follows:
    SELECT DISTINCT M.CODE_TABLE_NAME, M.COLUMN_NAME, M.ATTR_CODE, M.OFFSET, M.BYTE_LENGTH, M.STORAGE_TYPE, M.SOURCE_TARGET, M.REQUIRED, 
    
    M.MODIFIABLE, COALESCE (S.SCREEN_ROW_POS, 999) AS SCREEN_ROW_POS, COALESCE (S.COL, 999) AS COL, COALESCE (S.HILITE,' ') AS HILITE, 
    
    COALESCE (S.DEFAULT_VALUE,'  ') AS DEFAULT_VALUE, COALESCE (S.GUI_LITERAL,'  ') AS GUI_LITERAL FROM RZOZ722.DBX_IO_MAP_ATTR M 
    
    LEFT OUTER JOIN RZOZ722.DBX_SCREEN_ATTR S ON  M.MAP_ID = S.MAP_ID AND M.COLUMN_NAME = S.COLUMN_NAME AND 
    
    M.SOURCE_TARGET = S.SOURCE_TARGET WHERE M.MAP_ID IN (Select map_id from RZOZ722.dbx_dialog where dialog = 'SHOPCNTL' and ent_type = 25136) 
    
    AND M.ATTR_CODE <> 'X' ORDER BY M.SOURCE_TARGET, SCREEN_ROW_POS, COL, M.OFFSET
    

    The result of the query appears as follows:

    This is individual header information

    All the rows in result set appearing in the, whose screen row position comes between the two consecutive screen row positions of first result set, will come under one heading. The above illustration displays only up to nine columns because of space restrictions.

    The complete list of columns displayed are as follows:

    1. Code Table Name
    2. Column Name
    3. Attribute code
    4. Byte Length
    5. Storage Type
    6. Source Target
    7. Required
    8. Modifiable
    9. Screen Row Position
    10. Column
    11. Hilite
    12. Default value
    13. GUI Literal

    The column Screen Row Position in this result set will be used with the result set of fetching header contents to generate the display page and XSD.

    We execute one more query for X attributes, these are the attributes for which there is a '999' entry in screen row position of second resultset; also we can find the value of Attr_code column as 'X' by executing the following query:

    SELECT * FROM RZOZ722.DBX_IO_MAP_ATTR WHERE ATTR_CODE='X'AND MAP_ID=25136
    

    Here, we can see clearly that 'Description' contains '999' entry under screen row position column, so we need to execute one more query:

  2. The query to fetch X Attribute positions is as follows:
    Select ma2.column_name, min (s.screen_row_pos) from RZOZ722.dbx_IO_MAP_ATTR ma1, RZOZ722.dbx_IO_map_attr ma2, 
    
    RZOZ722.dbx_screen_attr s 	where ma1.map_id IN (Select map_id from RZOZ722.dbx_dialog where dialog = 'SHOPCNTL' and ent_type = 25136)
    
    and ma2.map_id IN (Select map_id from RZOZ722.dbx_dialog where dialog = 'SHOPCNTL' and ent_type = 25136) 
    
    and s.map_id IN (Select map_id from RZOZ722.dbx_dialog where dialog = 'SHOPCNTL' and ent_type = 25136)
    
    and ma1.map_id = ma2.map_id and ma1.map_id = s.map_id and ma2.map_id = s.map_id and ma1.offset between ma2.offset 
    
    and ma2.offset + ma2.byte_length and ma1.column_name = s.column_name and ma1.attr_code = 'X' 
    
    and ma2.attr_code <> 'X' group by ma2.column_name, ma2.offset
    

    The result returned by executing above query is as follows:

    This is the image displaying result set X positions

You can find the entries for a particular heading by considering the following points:

Code Tables

The values fetched from the code table is displayed as drop-down list.

For example, in the Individual Header result set, all the rows, which have some non-null value under column code table, should be displayed in drop down lists with values fetched from their code tables.

The query to fetch the enumerations is:

Select v.code_tbl, CASE WHEN t.code_table_type = 'CHAR1' then code_1 WHEN t.code_table_type = 'CHAR10' then code_10 
WHEN t.code_table_type = 'CHAR5' then code_5 
WHEN t.code_table_type = 'INTEGER' and t.code_range_flag = 'N' then char (CODE_NUM) 
ELSE ' ' END as code_value , v.code_desc 
from RZOZ722.dbx_code_variance v, RZOZ722.dbx_code_tbl t where 
v.code_tbl = '024' and t.code_tbl = '024' and v.code_tbl = t.code_tbl;

The result returned by executing above query is as follows:

This is an image displaying the enumeartion required to be displayed on drop down menu.


Copyright © 2009 CA. All rights reserved. Email CA about this topic