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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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