IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Split file into 10 small files with Header and trailer


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
purbasha

New User


Joined: 12 Dec 2012
Posts: 3
Location: India

PostPosted: Thu Feb 14, 2013 6:17 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Feb 14, 2013 7:29 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Feb 14, 2013 7:40 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top