View previous topic :: View next topic
|
Author |
Message |
homesh_career
New User
Joined: 25 Aug 2005 Posts: 5
|
|
|
|
I have a requirement where I need to create no of GDG files based on the data in the input file.
for example - if the input file contains 1000 records then I need to create 10 GDG's containing 100 recs each. If the input file contains 1500 recs then I need to create 15 GDG's.
Please let me know if you have any examples.
Thanks, Homesh |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Below pseudo code will give you the way...
Code: |
find record count
find loop count i.e. record count/100
open input file.
for 1 to loop count
call writerecs
end_for
close file
|
write program writerecs such that it will allocate next generation of gdg and write 100 records from input file to it.
To know how to allocated ps dynamically Check this link
Corrections are welcome.. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
When you say
Quote: |
for example - if the input file contains 1000 records then I need to create 10 GDG's containing 100 recs each. If the input file contains 1500 recs then I need to create 15 GDG's. |
do you mean you are going to create 10 (15) new generations of one base GDG, or 10 (15) +1 generations of 10 (15) different base GDG names?
Assuming you want to add generations to a single GDG base, I suspect this may be rather more challenging than you realize since the system does an exclusive enqueue on the GDG base name when you create a new generation of a GDG; I don't know if the system recognizes you already have the enqueue when you attempt to dynamically create the second generation. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you consider writing code that will read the "driver" file and generate a multiple jobs to be submitted thru the internal reader to be executed serially - one job submitting the next to maintain order. |
|
Back to top |
|
|
|