Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7314

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

Senior Member


Joined: 14 Mar 2007
Posts: 10535
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 COBOL file declaration jithinraghavan COBOL Programming 2 Fri Nov 16, 2018 10:54 pm
No new posts Will this code extract 1 byte from fi... pkmurali CLIST & REXX 8 Sat Nov 10, 2018 11:13 pm
No new posts Error reading file in REXX module ashek15 CLIST & REXX 3 Wed Oct 24, 2018 4:50 am
No new posts Convert VB file to FB plus special fo... cz016m SYNCSORT 15 Fri Oct 19, 2018 7:26 pm
No new posts Picking up the latest PS file pema_yozer JCL & VSAM 8 Thu Oct 11, 2018 12:26 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us