IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Table structure


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 765
Location: Whitby, ON, Canada

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

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

Global Moderator


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

PostPosted: Wed Nov 09, 2011 7:11 pm
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
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: 765
Location: Whitby, ON, Canada

PostPosted: Wed Nov 09, 2011 8:55 pm
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
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: 1788
Location: Bloomington, IL

PostPosted: Wed Nov 09, 2011 9:43 pm
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: 765
Location: Whitby, ON, Canada

PostPosted: Wed Nov 09, 2011 9:47 pm
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: 6966
Location: porcelain throne

PostPosted: Wed Nov 09, 2011 9:54 pm
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: 765
Location: Whitby, ON, Canada

PostPosted: Wed Nov 09, 2011 9:59 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top