View previous topic :: View next topic
|
Author |
Message |
rarvins
New User
Joined: 24 Jan 2007 Posts: 59 Location: Texas
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
Back to top |
|
|
rarvins
New User
Joined: 24 Jan 2007 Posts: 59 Location: Texas
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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 |
|
|
|