Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us