View previous topic :: View next topic
|
Author |
Message |
diwakar_rao
New User
Joined: 04 Mar 2007 Posts: 14 Location: Chennai
|
|
|
|
Hi,
I did a query on SYSIBM.SYSRELS to get the table relationship for a particular creator.
RELTBNAME column => PARENT Table name
TBNAME => CHILD Table name
Now i need to write the logic in REXX to find all the parent child relationship for the particular creator in hierarchical order.(ie) the parent tables first then the child tables. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
go ahead, and let us know the results |
|
Back to top |
|
|
diwakar_rao
New User
Joined: 04 Mar 2007 Posts: 14 Location: Chennai
|
|
|
|
any idea on the logic to be implemented ? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Your data is not clear:
Code: |
RELTBNAME column => PARENT Table name
TBNAME => CHILD Table name |
Show us a couple entries, and include some with real names. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you first determine the process needed to get the result you want. Once you know how to logically solve the requirement, then implement code.
I do not recommend starting to code before having a good idea of the mechanics needed.
You also need to decide how you want to handle "nesting" - child, parent, grand-parent etc. Very often a child table is the parent of another. . . |
|
Back to top |
|
|
|