Information Catalog Manager Administration Guide

Creating your own object types

When you create your own object types, start by creating a prototype for each object type that you need. Then create one or two sample objects (see Chapter 3, Populating the catalog with information for information about objects). Check how the objects appear in a Description view, especially the order in which the properties are listed. Try entering different values for each property to be sure you have the right data types and sizes. You might want to consult with your database administrator and some of your users to ensure that the properties you specify meet your work group's needs.

If you are not satisfied with your prototype, you can easily delete it and your sample objects and start over. After you create an object type, the only way to change or delete its properties is to delete the object type and all objects of that type. You must then create a new object type with different properties.

Also consider how many object types you will need. The Information Catalog Manager limits the number of object types that you can create in an information catalog to 999 999. It limits the number of objects that you can create for each type to 99 999 999. This limit includes all the object types that you ever created, even the ones that you deleted.

You can create an object type by using the Information Catalog Manager windows or tag language.

Notes for creating object types for the Information Catalog Manager for the Web

When you create a new object type in the Information Catalog Manager, you can associate a unique icon for the object type. For the Information Catalog Manager for the Web, you should create each new object type icon using the following requirements:

Make certain that you place the new .gif files on your Web server in the \ICONS directory.

Creating an object type by using the Information Catalog Manager windows

Start from the Information Catalog window.

  1. Right-click the Object types icon.
  2. Click Open as --> Icon list.
  3. Right-click the New Object Type icon.
  4. Click Open.

    The Create Object Type window opens.




    Creating an Elemental object type called Income Tax Return in the Create Object Type window.

  5. Click on the down arrow to display a list of Information Catalog Manager categories and click one.
  6. Type a unique external name for the new object type in the Object type name field.

    The rules for object type names are:

  7. Type a unique short name for the new object type in the Short name field.

    The rules for short names are:

  8. Optional: Identify the object type's icons. The default Windows icon for the selected category is displayed in the Windows icon field. To identify a different icon to represent the object type:
  9. Define all the properties for the object type (see Defining the object type's properties for detailed information).

    Click on:
    To:

    Add
    Define additional properties

    Modify
    Change a property before you create the object type

    Remove
    Remove a property before you create the object type

    Click the property, and then click Remove.

  10. Click Define UUI to choose up to five properties that constitute the universal unique identifier (UUI) for the object type (see Defining a universal unique identifier for the object type for detailed information).
  11. Click Create to save your changes in the database.

    Your changes display in the Object Types window, but not in other windows until you close and re-open them.

    To close the window without creating an object type, click Cancel.

Defining the object type's properties

Each object type can have up to 255 properties. The order in which you define the properties is the order in which the user will see them. You cannot change or rearrange the properties after you create the object type.

The Information Catalog Manager defines five properties that are common to all the Information Catalog Manager object types. These five properties are summarized in Table 10.

Table 10. Information Catalog Manager object type common properties
External name of property Property short name Definition
Object type identifier OBJTYPID1 The Information Catalog Manager generates this value, which uniquely identifies the object type of an object within the scope of the local information catalog.
Instance identifier INSTIDNT1 The Information Catalog Manager generates this value, which uniquely identifies an object within the scope of the local information catalog.
Name NAME You provide the name of an object. Choose names that users readily recognize and understand.
Last Changed Date and Time UPDATIME1 The Information Catalog Manager generates this value, indicating the date and time the object was last changed.
Last Changed By UPDATEBY1 The Information Catalog Manager generates this value, showing the user ID of the Information Catalog Manager session that last updated the Last Changed Date and Time property.
Note:
  1. If you select the Hide system generated properties check box in the Information Catalog Manager Settings notebook, you will not see this property in the description of the object.

To define additional properties:

  1. Click Add next to the Properties list. The Add Property window opens.




    In the Add Property window, defining the

    Use this window to define properties.

  2. In the Property name field, type a name for the property.

    The rules for property names are:

  3. In the Short name field, type a unique property short name.

    The rules for short names are:

  4. Choose a data type for the property from the Data type list:

    CHAR
    Up to 254 characters

    VARCHAR
    Up to 4 000 characters

    LONG VARCHAR
    Up to 32 700 characters

    TIMESTAMP
    Exactly 26 characters, in this format:
    yyyy-mm-dd-hh.mm.ss.nnnnnn:

    You can have up to 14 LONG VARCHAR properties for an object type.

  5. Type a size for the property in the Size field. The size must be within the range for the data type you selected.
  6. If you want to require entry of this property whenever you create an object of this type, select Entry required.
  7. Click OK to return to the Object Types window.

Defining a universal unique identifier for the object type

All object types must have at least one property that is part of the universal unique identifier, or UUI. The UUI is a string of characters that enables the Information Catalog Manager to tell one object from another. This requirement enables you to import the contents of one information catalog into another.

For example, in an information catalog for your manufacturing division, an object named Product List shows all products that are manufactured by the division. The sales division's information catalog might also have has an object named Product List that shows all products sold by the sales division.

Without a way to uniquely identify these objects, you risk overwriting the descriptive data when you combine information catalogs.

The Information Catalog Manager prevents overwriting by having you define the UUI. You do not have to create unique names on your own or know what every object in another information catalog is called.

You choose up to five properties of an object type and designate them in whatever order you want. The values for each of these properties, in the order you give them, become the UUI for any object of that type.

When you import an object into your information catalog, the Information Catalog Manager compares the values of the UUI properties to see if they match those of an existing object. If all the UUI properties have the same value in both objects, the Information Catalog Manager treats the two as the same object. It updates the values in the existing object's non-UUI properties. If the UUI properties have different values, the Information Catalog Manager adds the incoming object to the information catalog.

If you want to designate a property that you are sure is unique, such as a purchase requisition number or international standard book number (ISBN), you do not need to designate all five properties. You can enter the values for the UUI properties that you do not need with the not-applicable symbol. Or, when you create an object type, you can give it fewer UUI properties. (The not-applicable symbol is a hyphen unless you identified a different symbol when you created the information catalog.)

For performance reasons, be careful to select UUI properties so

that the total number of characters in their combined values is fewer than 254.

To define the UUI, start from the Define UUI window:




In the Define UUI window, identifying Name and Gross Earnings as UUI properties for the Income Tax object type.

  1. Select up to five properties as parts of the UUI. The part number determines the position that the property has in the UUI sequence.

    The Information Catalog Manager limits your choice of properties:

    For each part, choose a property:

    1. Click the down arrow next to the Part field to see a list of available properties.
    2. Click a property.
  2. When you finish filling in the parts, click OK to accept the UUI definition and return to the Object Types window.

Creating an object type by using the Information Catalog Manager tag language

  1. Enter the following lines in your tag language file:
    ACTION.OBJTYPE(ADD)
    OBJECT.TYPE(short_name_of_object_type)
         PHYNAME (name_of_table)
         CATEGORY(category_of_object_type)
         EXTNAME(external_name_of_object_type)
         ICWFILE(name_of_Windows_icon_file)
    

    After each keyword, type an appropriate value within the parentheses:

    Keyword
    Value

    TYPE
    The short name of the object type. The rules for short names are:
    • 8 character (SBCS) maximum.
    • First character must be uppercase or lowercase English alphabetic, @, #, or $.
    • Subsequent characters must be uppercase or lowercase English alphanumeric, @, #, $, or _.
    • It must be unique to the information catalog.

    PHYNAME
    The name of a DB2 table where the Information Catalog Manager stores objects of this type.

    If your DB2 tables follow naming conventions, you can use PHYNAME to give the underlying tables in your information catalog a different name from the object type name.

    If you do not specify this property, the Information Catalog Manager uses the short name you gave as TYPE.

    You can add PHYNAME only if you use a tag language file to create the object type. You cannot add it through the user interface.

    CATEGORY
    The category: GROUPING, ELEMENTAL, CONTACT, DICTIONARY, or SUPPORT.

    EXTNAME
    The external name of the object type. The rules for external names are:
    • 80 character maximum.
    • It must not contain null characters.
    • It must not be all blank characters.

    ICWFILE
    The name of the Windows icon file, including its extension. You give the drive and path information where the icon file exists as part of the IMPORT command when you import your tag language file.
  2. Type lines for each property you want to give your object type:
    :PROPERTY.SHRTNAME(short_name) DT(data_type) DL(size)
         UUISEQ(position_in_UUI) NULLS(y_or_n) EXTNAME(property_name)
    

    Keyword
    Value

    SHRTNAME
    The property short name. The rules for property short names are:
    • 8 character (SBCS) maximum.
    • First character must be uppercase or lowercase English alphabetic, @, #, or $.
    • Subsequent characters must be uppercase or lowercase English alphanumeric, @, #, $, or _.
    • It must not be an SQL reserved word.
    • It must be unique; if you type a name that already exists in this object type, the Information Catalog Manager asks you for another name.

    DT
    The data type: C, V, L, or T.

    C (CHAR)
    Up to 254 characters

    V (VARCHAR)
    Up to 4 000 characters

    L (LONG VARCHAR)
    Up to 32 700 characters

    T (TIMESTAMP)
    26 characters, in this format:
    yyyy-mm-dd-hh.mm.ss.nnnnnn

    DL
    The size for the property.

    UUISEQ
    The position this property has in the UUI: 1, 2, 3, 4, or 5. Include this keyword only if you want the property to be part of the UUI.

    NULLS
    Entry required?

    N
    Entry is required

    Y
    Entry is not required

    EXTNAME
    The property name. The rules for property names are:
    • 80 character maximum.
    • It must not contain null characters.
    • It must not be all blank characters.

    If you want to make the NAME property part of the UUI for this object type, you can use only the keywords SHRTNAME and UUISEQ for the property. The Information Catalog Manager defines values for other keywords, so you do not specify them or their values here.

After you add all properties for your object type, the tag language file looks like Figure 3. Figure 3 shows an abbreviated version of the "Relational tables and views" object type, which is one of the predefined object types that are provided with the Information Catalog Manager. The complete object type definition is available in the \SQLLIB\DGWIN\TYPES directory located on the drive where the DB2 Universal Database is installed.

Figure 3. Sample tag language file for an object type

COMMENT.------------------------------------------------------------
COMMENT.Generating the report object definitions.
COMMENT.------------------------------------------------------------
ACTION.OBJTYPE(MERGE)
OBJECT.TYPE(REPORT) CATEGORY(ELEMENTAL) PHYNAME(REPORTS)
    EXTNAME(Text based reports) ICWFILE(flgnyrep.ico)
PROPERTY. SHRTNAME(NAME)                          UUISEQ(0)
PROPERTY. SHRTNAME(SHRTDESC)   DT(V)   DL(250)    UUISEQ(0)   NULLS(Y)
    EXTNAME(Short description)
PROPERTY. SHRTNAME(LONGDESC)   DT(L)   DL(32700)  UUISEQ(0)   NULLS(Y)
    EXTNAME(Long description)
PROPERTY. SHRTNAME(ACTIONS)    DT(V)   DL(254)    UUISEQ(0)   NULLS(Y)
    EXTNAME(Actions)
PROPERTY. SHRTNAME(TITLE)      DT(V)   DL(254)    UUISEQ(0)   NULLS(N)
    EXTNAME(Report title)
PROPERTY. SHRTNAME(RPRTDATE)   DT(C)   DL(26)     UUISEQ(0)   NULLS(Y)
    EXTNAME(Report publication date)
PROPERTY. SHRTNAME(RPRTFRMT)   DT(V)   DL(80)     UUISEQ(0)   NULLS(Y)
    EXTNAME(Report presentation format)
PROPERTY. SHRTNAME(DBPRESNT)   DT(V)   DL(254)    UUISEQ(0)   NULLS(Y)
    EXTNAME(Report presentation requirements)
PROPERTY. SHRTNAME(OWNER)      DT(V)   DL(80)     UUISEQ(0)   NULLS(Y)
    EXTNAME(Report owner)
PROPERTY. SHRTNAME(FILENAME)   DT(V)   DL(254)    UUISEQ(1)   NULLS(N)
    EXTNAME(Report filename)
PROPERTY. SHRTNAME(TYPE)       DT(V)   DL(80)     UUISEQ(2)   NULLS(N)
    EXTNAME(Report class or type)
PROPERTY. SHRTNAME(URL)        DT(V)   DL(254)    UUISEQ(0)   NULLS(Y)
    EXTNAME(URL to access data)
 


[ Top of Page | Previous Page | Next Page ]