Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Generating Multiple DCLGEN's

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Generating Multiple DCLGEN's
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Mon Apr 04, 2011 8:48 pm    Post subject: Reply to: Generating Multiple DCLGEN's
Reply with quote

why not look Yourself at the manual ? icon_evil.gif

DB2 V9R1 for z/OS Command Reference
http://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    Post subject:
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: 1775
Location: Bloomington, IL

PostPosted: Tue Apr 05, 2011 12:13 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Tue Apr 05, 2011 12:48 am    Post subject: Reply to: Generating Multiple DCLGEN's
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    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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us