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
 

 

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: 10274
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: 1770
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: 10274
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 Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Validating file with multiple header/... mohitsaini DFSORT/ICETOOL 6 Thu Apr 13, 2017 1:53 am


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