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
 

 

How to get the table structure (keys, fields...)

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

New User


Joined: 03 Aug 2005
Posts: 17

PostPosted: Tue May 22, 2007 12:52 am    Post subject: How to get the table structure (keys, fields...)
Reply with quote

I really need to know if there's a way to get a DB2 table structure and indexes from a job?

I tried to use the DESCRIBE command but it seems it isn't working...

Ideas?

This is the JCL I tried to use...

Code:

//STEP001  EXEC PGM=IKJEFT01,DYNAMNBR=20,REGION=4M
//SYSTSPRT DD SYSOUT=*                                                 
//SYSPRINT DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//SYSTSIN  DD *                                                         
DSN SYSTEM(DB1D)                                                       
RUN  PROGRAM(DSNTEP2) PLAN(DSNTEP2) -                                   
     LIB('SYS1.DSNDB1D.RUNLIB.LOAD') PARMS('/ALIGN(MID)')               
END                                                                     
/*                                           
//SYSIN    DD *                             
DESCRIBE XXXX.XXXXXXXXXXXXXXXX;           
/*                                           
//*


Tks
Back to top
View user's profile Send private message

wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Tue May 22, 2007 2:56 am    Post subject: Re: How to get the table structure (keys, fields...)
Reply with quote

I don't think describe commands work in DB2 mainframe.

If you are looking to generate DDLs of objects, there is no simple way unless you use a third party tool like BMC or CA or even IBM DB2 tools.

However you can get all information about the objects from catalog tables and try and reconstruct DDLs yourself if you like.
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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Joinkeys with duplicated keys juares castro SYNCSORT 19 Fri Sep 23, 2016 5:58 am


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