| View previous topic :: View next topic |
| Author |
Message |
ademy Beginner
Joined: 24 Sep 2004 Posts: 2 Topics: 2
|
Posted: Fri Sep 24, 2004 6:30 pm Post subject: DB2 Table definition |
|
|
In oracle you can do describe <Table_Name> to check table definition. What is the equivalent in DB2 / _________________ Thanks
Adem |
|
| Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12401 Topics: 75 Location: San Jose
|
Posted: Fri Sep 24, 2004 6:45 pm Post subject: |
|
|
Ademy,
The option 2(DCLGEN) on the Interactive DB2 panel will give you the table definition. Alternatively you can run the following JCL which will create the table definition in your pds.
| Code: |
//STEP0100 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(XXXX)
DCLGEN TABLE(TABLENAME) OWNER(OWNERNAME) ACTION(REP) -
LIBRARY('PDS(TBLNAME)')
END
//*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
| Back to top |
|
 |
pzmohanty Beginner

Joined: 20 May 2004 Posts: 97 Topics: 43 Location: hyderabad, India
|
Posted: Sat Sep 25, 2004 4:13 am Post subject: |
|
|
Hi,
the db2 command to disply table structutre is :-
DESCRIBE TABLE <table name>.
OR
DESCRIBE INDEXES FOR TABLE <table name>.
describe do the following :
-> Displays columns of a table or a view
-> Displays indexes of a table or a view
hope this helps.........
Thanks & regrads _________________ Priya Ranjan Mohanty
Consultant
Kanbay Software (I) pvt. Ltd.
Hyderabad |
|
| Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12401 Topics: 75 Location: San Jose
|
Posted: Sat Sep 25, 2004 8:17 am Post subject: |
|
|
Pzmohanty,
Can you please enlighten me as to how you can run the DESCRIBE commands that you have shown in your post? Can I run them in Spufi or QMF?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
| Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Sun Sep 26, 2004 3:40 am Post subject: |
|
|
Optionally, you may code the language parameter in the job posted by Kolusu.
| Code: |
//STEP0100 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(XXXX)
DCLGEN TABLE(TABLENAME) OWNER(OWNERNAME) ACTION(REP) -
LANGUAGE(PLI) -
LIBRARY('PDS(TBLNAME)')
END
//*
|
The default seems to be COBOL. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
| Back to top |
|
 |
|
|
|