IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

REXX Tool to identify Table Relationship


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Apr 06, 2009 11:50 pm
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
Reply with quote

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

Global Moderator


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

PostPosted: Wed Apr 08, 2009 7:39 pm
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

Moderator Emeritus


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

PostPosted: Thu Apr 09, 2009 12:11 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Load new table with Old unload - DB2 DB2 6
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top