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

Rexx to list column names of a given table


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

Global Moderator


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

PostPosted: Wed Sep 15, 2010 4:08 pm
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: 2358
Location: Israel

PostPosted: Wed Sep 15, 2010 4:16 pm
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 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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
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
Search our Forums:

Back to Top