APAR status
Closed as program error.
Error description
Configuration: -------------- Tool = Rational System Architect Version = 11.4.2.3 Description: ------------ VBA adds HETEROGENEOUSxxx properties in a faulty way Steps to Reproduce: ------------------- 1. In a new encyclopedia add the USRPROPS and VBA found below 2. After the encyclopedia has been reopened, create five new definitions: An 'AAA' named A1 An 'AAA' named A2 A 'CCC' named C1 A 'CCC' named C2 A 'CCC' named C3 3. Run the script found below 4. Open 'C1' ==? The parent is set to: Definition:AAA:'A1' Further steps to show that the result above is faulty: ------------------------------------------------------ 5. Open C2 6. For the Parent Property, select Choices 7. Drag A2 to the Parent ==? The parent is set to: Definition:AAA:A2 Note that A2 is not quoted 8. Open A1 9. For the Children Property, select Choices 10. Drag C3 to the Children 11. Click OK ==? You get a warning message 12. Cancel out of the latest change 13. Open C1 14. Remove the quotes around A1 15. Click OK 16. Repeat steps 8-11 ==? Now this works 17. Rewrite the script and the steps having an A that has a name with spaces: 17a Create a new 'AAA' named: A1 test 17b Create a new 'CCC' named C4 17c Change the following VBA line: Set defs = SAEncy.GetFilteredDefinitions('A1', USER1) into: Set defs = SAEncy.GetFilteredDefinitions('A1 test', USER1) 17d Run the script 17e open 'C4' ==? Now the quotes are needed and also work Other information: ------------------ The USRPROPS: RENAME DEFINITION 'USER 1' TO 'AAA' RENAME DEFINITION 'USER 2' TO 'BBB' RENAME DEFINITION 'USER 3' TO 'CCC' RENAME DEFINITION 'USER 4' TO 'DDD' DEFINITION 'AAA' { PROPERTY 'Children' { EDIT HETEROGENEOUSLISTOF 'CCC', 'DDD' MIRRORS 'Parent' } } DEFINITION 'BBB' { PROPERTY 'Children' { EDIT HETEROGENEOUSLISTOF 'CCC', 'DDD' MIRRORS 'Parent' } } DEFINITION 'CCC' { PROPERTY 'Parent' { EDIT HETEROGENEOUSONEOF 'AAA', 'BBB' MIRRORS 'Children' } } DEFINITION 'DDD' { PROPERTY 'Parent' { EDIT HETEROGENEOUSONEOF 'AAA', 'BBB' MIRRORS 'Children' } } The VBA: -------- Public Sub Add_Parent() Dim SAApp As Application Dim SAEncy As Encyclopedia Set SAApp = New SA2001.Application Set SAEncy = SAApp.Encyclopedia Dim defs As SAObjects Dim theParent As Definition Dim theChild As Definition Dim oColl As OfCollection Dim USER1 As Long Dim USER3 As Long USER1 = 141 USER3 = 143 SAEncy.OpenObjectsAsReadOnly = True ' Get the definition to use as Parent Set defs = SAEncy.GetFilteredDefinitions('A1', USER1) defs.ReadAll Set theParent = defs.Item(1) ' Get the definition to set the Parent in SAEncy.OpenObjectsAsReadOnly = False Set defs = SAEncy.GetFilteredDefinitions('C1', USER3) defs.ReadAll Set theChild = defs.Item(1) ' Set the Parent in theChild Set oColl = theChild.GetPropertyAsCollection('Parent') oColl.Add theParent oColl.SetProperty theChild.Save End Sub
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * **************************************************************** * RECOMMENDATION: * **************************************************************** The OfCollection code is quoting all names whether they need quotes or not.
Problem conclusion
Fixed OfCollection code to only quote names when needed.
Temporary fix
Comments
APAR Information
APAR number
PM87588
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-04-23
Closed date
2013-06-14
Last modified date
2013-06-14
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:
14 June 2013