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
 

 

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: 158
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: 641
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: 6966
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: 158
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: 641
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: 158
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: 1738
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: 641
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: 6966
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: 641
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: 158
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 Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Updating online Db2 table kishpra DB2 3 Fri Aug 12, 2016 2:44 pm
No new posts Getting soc4 on internal table in cobol abdulrafi COBOL Programming 13 Fri May 06, 2016 3:39 pm


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