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
 

 

Split file into 10 small files with Header and trailer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Split file into 10 small files with Header and trailer
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7309

PostPosted: Thu Feb 14, 2013 7:29 pm    Post subject: Reply to: Split file into 10 small files with Header and tra
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10234
Location: italy

PostPosted: Thu Feb 14, 2013 7:40 pm    Post subject: Reply to: Split file into 10 small files with Header and tra
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
http://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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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