Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
REXX Tool to identify Table Relationship

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
diwakar_rao

New User


Joined: 04 Mar 2007
Posts: 14
Location: Chennai

PostPosted: Mon Apr 06, 2009 11:29 pm    Post subject: REXX Tool to identify Table Relationship
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Mon Apr 06, 2009 11:50 pm    Post subject: Reply to: REXX Tool to identify Table Relationship
Reply with quote

go ahead, and let us know the results
Back to top
View user's profile Send private message
diwakar_rao

New User


Joined: 04 Mar 2007
Posts: 14
Location: Chennai

PostPosted: Wed Apr 08, 2009 3:05 pm    Post subject:
Reply with quote

any idea on the logic to be implemented ?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2081
Location: Silicon Valley

PostPosted: Wed Apr 08, 2009 7:39 pm    Post subject: Reply to: REXX Tool to identify Table Relationship
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 09, 2009 12:11 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 4 Tue Sep 19, 2017 1:39 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm

Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us