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

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm

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