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

Generating Multiple DCLGEN's


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

New User


Joined: 24 Jan 2007
Posts: 59
Location: Texas

PostPosted: Mon Apr 04, 2011 8:39 pm
Reply with quote

Hello,

I need to generate the DCLGEN of multiple tables. I have generated the DCLGEN for tables one at a time by using DB2I... But then doing it manually for 100's of tables would be time consuming and inefficient. can somebody share any thoughts on DCLGEN's can be generated for multiple tables in batch mode.

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10803
Location: italy

PostPosted: Mon Apr 04, 2011 8:48 pm
Reply with quote

why not look Yourself at the manual ? icon_evil.gif

DB2 V9R1 for z/OS Command Reference
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNCRK13/CCONTENTS?SHELF=DSNSHKA3&DN=SC18-9844-03&DT=20081204091348

since DCLGEN is a command it should be easy to find out how to run it in batch
( as You would with any other db2 command)
Back to top
View user's profile Send private message
rarvins

New User


Joined: 24 Jan 2007
Posts: 59
Location: Texas

PostPosted: Mon Apr 04, 2011 11:42 pm
Reply with quote

Hi Enrico,

I did try executing the DCLGEN and am able to see the result for a single table:

000005 //PS010 EXEC PGM=IKJEFT1B
000006 //SYSTSPRT DD SYSOUT=*
000007 //SYSPRINT DD SYSOUT=*
000008 //SYSUDUMP DD SYSOUT=*
000009 //SYSTSIN DD *
000010 DSN
000011 DCLGEN TABLE(HLQ.TBNAME1) -
000012 LIBRARY('TESTTS.DCLGEN.OUTPUT')
000013 /*

Is there a way for me to include multiple tables in the SYSIN? like HLQ.TBNAME2, TBNAME2 and so on?

Thanks
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Tue Apr 05, 2011 12:13 am
Reply with quote

Have you considered writing (or having written by someone more knowledgeable) a small piece of code (Rexx would be preferable, I think, but you could use COBOL or PL/I at a pinch) to loop through your list of tables and generate anything from the DSN subcommands to the encapsulating JCL?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10803
Location: italy

PostPosted: Tue Apr 05, 2011 12:48 am
Reply with quote

what happens when
instead of
Code:
//PS010 EXEC PGM=IKJEFT1B
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
DSN
DCLGEN TABLE(HLQ.TBNAME1) -
LIBRARY('TESTTS.DCLGEN.OUTPUT')
/*


You run something like
Code:
//PS010 EXEC PGM=IKJEFT1B
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
DSN
DCLGEN TABLE(HLQ.TBNAME1) -
LIBRARY('TESTTS.DCLGEN.OUTPUT.PDS(TBANAME1)')
DCLGEN TABLE(HLQ.TBNAME2) -
LIBRARY('TESTTS.DCLGEN.OUTPUT.PDS(TBANAME2)')
...
...
...
DCLGEN TABLE(HLQ.TBNAMEn) -
LIBRARY('TESTTS.DCLGEN.OUTPUT.PDS(TBANAMEn)')
/*

You should have noticed that the library parameter/keyword accepts also PDS member names
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 define 1 DCB parms for multiple outpu... JCL & VSAM 9
No new posts Multiple find/replace on the same dat... DFSORT/ICETOOL 4
No new posts Copy a DS Member to multiple users at... TSO/ISPF 8
This topic is locked: you cannot edit posts or make replies. How to search multiple strings in a PDS IBM Tools 3
No new posts How to search multiple members of a P... JCL & VSAM 13
Search our Forums:

Back to Top