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

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


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top