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: 10888
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: 1787
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: 10888
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 combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts SORT JCL to merge multiple tow into s... DFSORT/ICETOOL 6
No new posts Using Multiple IFTHEN and WHEN condit... SYNCSORT 12
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top