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

PROBLEM IN GETTING DCLGEN WITH REXX


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Mon Nov 09, 2009 5:51 pm
Reply with quote

HI,

I tried the following tso command and it works to get the dclgen for a table.

TSO DSN
DCLGEN TABLE(TABLENAME) ACTION(REPLACE)
'DSN NAME'

BUT WHEN I TRIED IT IN REXX in the below syntax it is not working.

any one have any clue to sort this?

ADDRESS TSO
" DSN"
"DCLGEN TABLE(TABLENAME) ACTION(REPLACE)"
"'DSN NAME'"
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon Nov 09, 2009 5:58 pm
Reply with quote

r2k1984 wrote:
BUT WHEN I TRIED IT IN REXX in the below syntax it is not working.

WOW, what a huge mountain of useful information you have given us to work with.

A little help on asking for help .................

All that we know is that there is a problem, we do not know what the problem is because you have not told us.
We do not know what you have read to look for help because you have not told us.
We do not know what you have tried yourself because you have not told us.

Without the obvious information we can do nothing to help you, or if we do, only guessing wildly which of course may cause you more problems than you originally have. Unless of course we all sit back and wait for psychic day icon_rolleyes.gif

Now sit back and think about what we might need to know to be able to help you.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Mon Nov 09, 2009 6:09 pm
Reply with quote

i tried the above tso commands and the i was able to get the dclgen for a table.

But when i execute the below rexx


/* REXX TO GET DCLGEN FOR A TABLE */
/* ITRACE */
ADDRESS TSO
"DSN "
"DCLGEN TABLE(NRODB2T.RESPONSE) ACTION(REPLACE)"
"SSYG.USER.RAM.OUT(RESPONSE)"


it was executing only till dsn and the below two commands are not executed . I want the dclgen to be written to the file. is there other ways to get the dclgen in batch mode.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Nov 09, 2009 6:23 pm
Reply with quote

expat,
your turn. 36_8_12.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon Nov 09, 2009 6:58 pm
Reply with quote

So what have you told me that is different from your original post ?
So yet again I say ........................................

expat wrote:
r2k1984 wrote:
BUT WHEN I TRIED IT IN REXX in the below syntax it is not working.

WOW, what a huge mountain of useful information you have given us to work with.

A little help on asking for help .................

All that we know is that there is a problem, we do not know what the problem is because you have not told us.
We do not know what you have read to look for help because you have not told us.
We do not know what you have tried yourself because you have not told us.

Without the obvious information we can do nothing to help you, or if we do, only guessing wildly which of course may cause you more problems than you originally have. Unless of course we all sit back and wait for psychic day icon_rolleyes.gif

Now sit back and think about what we might need to know to be able to help you.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Mon Nov 09, 2009 9:21 pm
Reply with quote

Expat iam really sorry. I dont know what else information is required.

I have told my problem above.

Please could you point the things which is required.

When i execute the above 3 commands in tso it is working and whn i kept the code in rexx and execute since the control is going to tso and only the dsn command is executing, the rest dclgen and libraries are not executing.

please let us know how to execute
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Mon Nov 09, 2009 9:29 pm
Reply with quote

r2k1984,
Rather than stating what your "problem" is and asking for help to "solve" it with insufficient information, try stating what objective you are attempting to satisfy and seeking advice as to possible methods for meeting that objective - for example:
"I am trying to create a DCLGEN in Batch. Can someone provide sample JCL showing how to accomplish that?"
REXX may not be the best method. It may not even be a viable method.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Mon Nov 09, 2009 9:56 pm
Reply with quote

my requirement is to get the DDL statements for a table .

Since i dont have access to platinum or db2look or any other tools.

Can any one suggest a good way to solve the issue
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Nov 09, 2009 10:15 pm
Reply with quote

well, this link DCLGEN indicates your syntax sucks.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Mon Nov 09, 2009 11:19 pm
Reply with quote

dbzTHEdinosauer wrote:
well, this link DCLGEN indicates your syntax sucks.



First of all it is working when i tried it in TSO directly

but i was able to pass the DCLGEN to the dsn after the DSN command is executed.

If the syntax is wrong it would not have executed in TSO tooo right??????
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Nov 09, 2009 11:45 pm
Reply with quote

well, excuse me for living,
you seem to have a handle on everything,
i will try to refrain from making anymore posts in this thread.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Tue Nov 10, 2009 2:54 am
Reply with quote

r2k1984 wrote:
my requirement is to get the DDL statements for a table .

Since i dont have access to platinum or db2look or any other tools.

Can any one suggest a good way to solve the issue


Now, you've "changed horses in mid-stream". First you say ( and show DB2 commands that would lead one to believe that ) you want to generate the DCLGEN for a table ( using REXX, of course ), but now it appears you want to generate the DDL, NOT the DCLGEN. You also state that the commands you show work under TSO.

Well first of all, a table's DCLGEN and its DDL are two very, very different things. DCLGEN only describes the table and its columns as a structure generated in a target host language, while DDL describes the declarations ( in DB2 terms ) that a DBA would use to construct the table itself, including such elements as Foreign Keys, Constraints, Defaults, Partitions, etc.

Second, as Dick has already pointed out, the Command Set you show would NOT pass the syntax requirements for a DCLGEN request - under TSO or anywhere else. Perhaps you 're-keyed' your statements instead of using CUT/PASTE, and made some errors in doing so?

Anyway, you really need to step back and describe what it is you REALLY want ( DCLGEN or DDL ). It might really help to know what you intend to do with the output - perhaps you don't really need what you think you do.
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Tue Nov 10, 2009 5:29 am
Reply with quote

It seems to me you want to see the columns in table but don't know how to get the DDL so you are trying to gen DCLGEN instead.

My assumption here could be wrong, but if right then this is not the right way to look at table structure.

Talk to your DBAs, they will have the right tools to get the DDL. You can also query catalog tables using SPUFI to get most details about table structure.

On REXX, do you have just one default DB2 subsystem or something like that? Because after DSN I don't see any DB2 subsystem name in your code that you posted.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Tue Nov 10, 2009 8:43 am
Reply with quote

Expat : I want to find the DDL for a table , but I dont have any tools to find it out. so Iam trying a way to create a DDL statement with help of DCLGEN.

Wanderer: You are exactly thinking the same way Iam thinking. We are not able to reach DBA and access for the tools will not be given to us. THat is the reason Iam trying another way to solve the issue...

We have only one DB2 region set . So it accepts the region without giving subsystem.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Nov 10, 2009 9:39 am
Reply with quote

Hello,

Do you not have read access to the catalog tables? Has it been requested yet?

If you find a way to get what you are looking for, how will this be used? As RB mentioned, if we knew what you were trying to accomplish (rather than the problems associated with getting the info you want), we might be able to offer something more usable.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Tue Nov 10, 2009 10:36 am
Reply with quote

Yes I have access to catlog tables.

I have a requirement to extract DDL statement for all tables in our system.

But we dont have access to execute platinum and db2look.

So we tried to create a rexx to generate ddl statement for a table. Which can be achived , when we get the DCLGEN. Which is the indirect way to get the data.

It woud be great, if any one can tell a way to get the DDL statements of the table without platinum or db2look..
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Tue Nov 10, 2009 1:24 pm
Reply with quote

Who could have provided you with that requirement but doesn't bother to provide you access to any tools and knows that you can't contact a DBA?

This is very unreasonable!

DCLGEN doesn't provide whole table DDL. e.g. If table has a constraint, if columns have default values or if fieldprocs are present and many more don't show up in DCLGEN.

If you just want column names and NULL or not, why don't you just get from SYSCOLUMNS? Why the REXX route?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Nov 10, 2009 8:45 pm
Reply with quote

Hello,

As long as you will not provide requested info, we will not be much help. . . icon_confused.gif

To repeat:
Quote:
If you find a way to get what you are looking for, how will this be used? As RB mentioned, if we knew what you were trying to accomplish (rather than the problems associated with getting the info you want), we might be able to offer something more usable.


Quote:
I have a requirement to extract DDL statement for all tables in our system.
Typically provided by the dba. . . Many (most?) developers would not have the background to do this. Where/how did this requirement originate?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Nov 10, 2009 8:52 pm
Reply with quote

Quote:
Where/how did this requirement originate?

[No attempt at political correctness on]
oh, let me guess, please, please.

the company contracted with the client, saying, yes you can fire all your experienced people because we can do everything.
So,the rule is: no communications with the clients DBA staff.
Otherwise someone would notice that the outsourcers were actually sorta out of IT.

[No attempt at political correctness off]
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 Run rexx with JCL Job CLIST & REXX 1
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
Search our Forums:

Back to Top