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
 
Table structure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Wed Nov 09, 2011 4:02 pm    Post subject: Table structure
Reply with quote

My requirement is to fetch the table column names and its datatype by connecting from REXX program.

I'm to create the Cobol equivalent of the DB2 TABLE.

When a user types in the table name the table structure with its its column names should be retrieved so that the REXX program can convert the column names to its Cobol variable equivalents.

Is there a way to get the table structure from the BMC , if is can we connect the BMC to retrieve the same.Please help.
Back to top
View user's profile Send private message

don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 662
Location: Whitby, ON, Canada

PostPosted: Wed Nov 09, 2011 6:10 pm    Post subject:
Reply with quote

DCLGEN?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Wed Nov 09, 2011 7:11 pm    Post subject:
Reply with quote

tecnokrat,
if you would take 5 minutes and describe what tools you have,
what you want to be able to accomplish,
you may get more productive suggestions,
than if you attempt to isolate what is a wall to you
for our suggestions;
nor will you receive the full bounty of our experience.
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Wed Nov 09, 2011 8:35 pm    Post subject:
Reply with quote

I want to build a tool which generates me the DCLGEN for a given table,obviously which is a new table.

At my shop we have to create the DCLGEN from the table structure so to reduce the pain i thot of this idea.

So when a user inputs the TSO <new table name>

The tool would search for its DCLGEN with the same name, if found then will ignore and if not found then would try to create the DCLGEN from the table column names and its datatype.

This is what i want.Please advice me in retrieving the table structure elsewhere like the BMC load or if any other.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 662
Location: Whitby, ON, Canada

PostPosted: Wed Nov 09, 2011 8:55 pm    Post subject:
Reply with quote

I am confused. DCLGEN *is* a tool.
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Wed Nov 09, 2011 9:34 pm    Post subject:
Reply with quote

DCLGEN in the sense the Cobol equivalent for the table.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1786
Location: Bloomington, IL

PostPosted: Wed Nov 09, 2011 9:43 pm    Post subject:
Reply with quote

And instead of wasting time writing an inferior tool, why not just run DCLGEN in the DB2 command sense?
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 662
Location: Whitby, ON, Canada

PostPosted: Wed Nov 09, 2011 9:47 pm    Post subject:
Reply with quote

DCLGEN is the name of the DB2 command that creates the "Cobol equivalent for the table".

It just so happens that it has become common practice to refer to the output of the DCLGEN command as a "DCLGEN".

The most common way to create a "DCLGEN" is to choose option 2 on the DB2I PRIMARY OPTION MENU. (i.e. the same menu where you find SPUFI).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Wed Nov 09, 2011 9:54 pm    Post subject:
Reply with quote

thx for letting us know what you are trying to accomplish.
with that knowledge, members of the board were able to provide you with a solution to need,
and not your problem
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 662
Location: Whitby, ON, Canada

PostPosted: Wed Nov 09, 2011 9:59 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
thx for letting us know what you are trying to accomplish.
with that knowledge, members of the board were able to provide you with a solution to need,
and not your problem
It's another example of why terminology is important; people tend to throw around the word "DCLGEN" carelessly, but usually the meaning is clear from the context. In this thread it took a few tries before the TS explained what the context was.
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Wed Nov 09, 2011 10:41 pm    Post subject:
Reply with quote

sorry for the ignorance.never explored the DB2i functionality.

Now, able to create the same thru DB2I. Thanks all.
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 Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm
No new posts load and delete table through JCL wit... ram_vizag JCL & VSAM 9 Thu Feb 01, 2018 12:47 am
No new posts Unloading DB2 table in CSV format alo... grvtomar COBOL Programming 7 Sun Jan 28, 2018 2:05 am

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