View previous topic :: View next topic
|
Author |
Message |
purbasha
New User
Joined: 12 Dec 2012 Posts: 3 Location: India
|
|
|
|
Hi,
I have one input file having 10 million records excluding header and trailer record. My requirement is to split the file into 10 small files
and add header and trailer in all the 10 files.
The header would be same as present in the input file and trailer record count would be having the total record
count present in the file.
for example:
Input file
----------
HEADER
|
Detail record (10 million)
|
TRAILER RECORD COUNT: 10,000,002
Expected output
---------------
OUT1
HEADER
|
Detail record (1 million)
|
TRAILER RECORD COUNT: 1,000,002
OUT2
HEADER
|
Detail record (1 million)
|
TRAILER RECORD COUNT: 1,000,002
|
|
till
|
|
|
OUT10
HEADER
|
Detail record (1 million)
|
TRAILER RECORD COUNT: 1,000,002
I want to achieve the above through JCL only, kindly suggest.
Regards,
Purva |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Sorry, you can't do it with JCL.
You can with your Sort product.
Can you post the Sysout from a Sort step, please, so we can see what you have, and what level it is? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
to make the most out of the questions You ask
it would be wise to read and meditate on
How To Ask Questions The Smart Way
catb.org/~esr/faqs/smart-questions.html
where it is suggested to carry on a bit of research on Your own before asking
if You had done that ( searching the forum ) with "split with header"
You would have found quite a few topics which seems to fit Your requirement |
|
Back to top |
|
|
|