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: 4648
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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


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