Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
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 to list column names of a given table

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

New User


Joined: 10 Jul 2006
Posts: 1

PostPosted: Wed Sep 15, 2010 4:06 pm    Post subject: Rexx to list column names of a given table
Reply with quote

I need a Rexx code to list the column names of a given table.
eg: If i give CUST as table name, the output should be
Select CUST_ID,FNAME,LNAME...... FROM CUST WHERE <Primary Key>;

If this output query can be placed in a PS it will be more helpful. Or just listing the column names and keys will also work good.

Can someone helpme on this?
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Wed Sep 15, 2010 4:08 pm    Post subject: Reply to: Rexx to list column names of a given table
Reply with quote

I moved this topic to the DB2 forum, although you haven't specified exactly what database you're referring to. If it's not DB2, let me know and I'll move it elsewhere.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Sep 15, 2010 4:16 pm    Post subject:
Reply with quote

You can read SYSCOLUMNS through the DSNREXX interface.

O.
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 5 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 column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us