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 Usergroups Profile Log in to check your private messages Log in
 

 

Finding Primary key for bulk of tables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
banuradha

New User


Joined: 20 Dec 2006
Posts: 19
Location: India

PostPosted: Wed Dec 27, 2006 12:16 pm    Post subject: Finding Primary key for bulk of tables
Reply with quote

Hi all,

I have requirement to list primary keys for a bulk of tables and is that possible in REXX? or anyother way.

Thanks
Banu
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Dec 28, 2006 1:44 am    Post subject: Re: Finding Primary key for bulk of tables
Reply with quote

What kind of tables are you talking about?
Back to top
View user's profile Send private message
banuradha

New User


Joined: 20 Dec 2006
Posts: 19
Location: India

PostPosted: Thu Dec 28, 2006 10:27 am    Post subject: Re: Finding Primary key for bulk of tables
Reply with quote

DavidatK wrote:
What kind of tables are you talking about?


Its DB2 tables, I got an answer for it.if u know someother way please share it

the answer is

Code:
SELECT NAME
FROM
SYSIBM.SYSCOLUMNS
WHERE TBNAME = 'Table_name'
AND   TBCREATOR = 'Tb_creator '
AND   KEYSEQ > 0
ORDER BY KEYSEQ ASC
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Getting list of tables defined under ... kishpra DB2 2 Wed Aug 24, 2016 10:36 am
No new posts ISPF Tables Creation newsysprg TSO/ISPF 6 Wed Jul 13, 2016 2:21 pm
No new posts Finding unreferenced datasets without... Alan Playford JCL & VSAM 5 Tue Jul 12, 2016 9:07 pm
No new posts Finding repetead surnames in differen... blackjack202 DFSORT/ICETOOL 7 Tue Jun 07, 2016 7:42 pm
No new posts SFTP to primary and secondary servers mallik4u JCL & VSAM 4 Tue Jun 07, 2016 12:52 pm


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