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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 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
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


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