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
 

 

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: 4649
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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts RFE: DB2 support for mixed case names. Pedro DB2 0 Tue Jul 04, 2017 1:32 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm


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