IBM Support

PM82670: Garbage attributes without data elements

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Brief Description of issue:
    Garbage attributes without data elements be created after rename
    roles.
    
    Expected Results
    Attributes created with data elements successfully.
    
    Actual Results
    Attributes created without underlying data elements.
    
    Impact
    This breaks client's data model.
    
    STEPS to REPRODUCE
    Create a New Entity Relation Diagram
    Drop 2 entities
    Edit Entity_1
    Create 2 PK named Ent 1 PK 1 and Ent 1 PK 2
    Draw TWO Identifying Relations IR1 and IR2 from Entity_1 to
    Entity_2
    Edit IR1
    Under Foreign Keys, add roles named Ent1 Role 1 and Ent1 Role 2
    OK
    Save diagram
    Run Update FK
    Everything should be good
    Edit IR1
    Rename the roles
    OK
    Save diagram
    Update FK
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Issue is caused by a defect in the code whereby FK
    attributes which must be deleted during FK propagation are
    not being properly removed from Access Paths and upon saving
    of Access Paths erroneous attributes with no Data Element
    values and unconnected to their owning entities will be
    created. For all intended purposes, these Attributes are
    considered orphans.
    

Problem conclusion

  • The issue has been addressed so discarded FK attributes are
    properly removed from Access Paths.
    
    Workarounds to delete the orphaned attributes and also
    orphaned columns if they are created is to run the following
    VBA macros:
    
    Here are two macros. One which deletes orphan Attributes and
    one which deletes orphan Columns. It is possible that the
    same defect, in a similar scenario using Physical Data Model
    diagrams could have created orphan Columns.
    
    Public Sub RemoveOrphanAttributes()
        Dim saimf As ISAImf
        Dim sa2001 As New sa2001.Application
        Dim colAttributes As SAObjects
        Dim attributeDef As Definition
        Dim ofcolEntities As OfCollection
        Dim ofcolEntityDef As Definition
        Dim ofcolAttributes As OfCollection
        Dim ofcolAttributeDef As Definition
        Dim colDeleteDDIDs As Collection
        Dim lDDiD As Long, i, hDef As Long
        Dim bFound As Boolean
    
        On Error Resume Next
    
        Set colAttributes =
    sa2001.Encyclopedia.GetFilteredDefinitions(vbNullString,
    105)
        colAttributes.ReadAll
    
        hDef = 0
        Set saimf = Application.Interface("ISAImf")
        Set colDeleteDDIDs = New Collection
        For Each attributeDef In colAttributes
     Set ofcolEntities =
    attributeDef.GetPropertyAsCollection("Entity Name")
    'DEV_STRING
     For Each ofcolEntityDef In ofcolEntities
         Set ofcolAttributes =
    ofcolEntityDef.GetPropertyAsCollection("Description")
    'DEV_STRING
         For Each ofcolAttributeDef In ofcolAttributes
      If ofcolAttributeDef.ddId =
    attributeDef.ddId Then
          bFound = True
      End If
         Next ofcolAttributeDef
         If bFound = False Then
      colDeleteDDIDs.Add attributeDef.ddId
         Else
      bFound = False
         End If
     Next ofcolEntityDef
        Next attributeDef
    
        For i = 1 To colDeleteDDIDs.Count
     If 0 =
    saimf.SAOpenDefinition(colDeleteDDIDs.Item(i), hDef) Then
         If 0 = saimf.SADeleteDefinition(hDef) Then
         Else
      bFound = False
         End If
     End If
        Next i
    
        Set colAttributes = Nothing
        Set colAttributes = Nothing
        Set attributeDef = Nothing
        Set ofcolEntities = Nothing
        Set ofcolEntityDef = Nothing
        Set ofcolAttributes = Nothing
        Set ofcolAttributeDef = Nothing
        Set colDeleteDDIDs = Nothing
    End Sub
    
    Public Sub RemoveOrphanAColumns()
        Dim saimf As ISAImf
        Dim sa2001 As New sa2001.Application
        Dim colAttributes As SAObjects
        Dim attributeDef As Definition
        Dim ofcolEntities As OfCollection
        Dim ofcolEntityDef As Definition
        Dim ofcolAttributes As OfCollection
        Dim ofcolAttributeDef As Definition
        Dim colDeleteDDIDs As Collection
        Dim lDDiD As Long, i, hDef As Long
        Dim bFound As Boolean
    
        On Error Resume Next
    
        Set colAttributes =
    sa2001.Encyclopedia.GetFilteredDefinitions(vbNullString,
    106)
        colAttributes.ReadAll
    
        hDef = 0
        Set saimf = Application.Interface("ISAImf")
        Set colDeleteDDIDs = New Collection
        For Each attributeDef In colAttributes
     Set ofcolEntities =
    attributeDef.GetPropertyAsCollection("Entity Name")
    'DEV_STRING
     For Each ofcolEntityDef In ofcolEntities
         Set ofcolAttributes =
    ofcolEntityDef.GetPropertyAsCollection("Description")
    'DEV_STRING
         For Each ofcolAttributeDef In ofcolAttributes
      If ofcolAttributeDef.ddId =
    attributeDef.ddId Then
          bFound = True
      End If
         Next ofcolAttributeDef
         If bFound = False Then
      colDeleteDDIDs.Add attributeDef.ddId
         Else
      bFound = False
         End If
     Next ofcolEntityDef
        Next attributeDef
    
        For i = 1 To colDeleteDDIDs.Count
     If 0 =
    saimf.SAOpenDefinition(colDeleteDDIDs.Item(i), hDef) Then
         If 0 = saimf.SADeleteDefinition(hDef) Then
         Else
      bFound = False
         End If
     End If
        Next i
    
        Set colAttributes = Nothing
        Set colAttributes = Nothing
        Set attributeDef = Nothing
        Set ofcolEntities = Nothing
        Set ofcolEntityDef = Nothing
        Set ofcolAttributes = Nothing
        Set ofcolAttributeDef = Nothing
        Set colDeleteDDIDs = Nothing
    End Sub
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM82670

  • Reported component name

    TLOGIC SYS ARCH

  • Reported component ID

    5724V68SA

  • Reported release

    B42

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-02-12

  • Closed date

    2013-03-15

  • Last modified date

    2013-03-15

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    TLOGIC SYS ARCH

  • Fixed component ID

    5724V68SA

Applicable component levels

  • RB42 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS6RBX","label":"Rational System Architect"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.4.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 March 2013