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

SPLIT based on Trailer


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pshongal

New User


Joined: 14 Jun 2012
Posts: 96
Location: India

PostPosted: Wed Jan 23, 2019 11:50 am
Reply with quote

Hi,

I have a requirement to split records in 3 files, but problem is I need to get Detail and Trailer record in the same file after splitting

E.g: Say I have a file as below.

Code:

115892150   20181109REF1                  13   $10.00
115892168   20181109REF2                  13   $11.00
115892176   20181109REF3                  13   $12.00
ID     0111                                      <<-Trailer rec
115892184   20181109REF4                  13   $13.00
115892192   20181109REF5                  13   $14.00
ID     0012                                      <<-Trailer rec                        
115892200   20181109REF6                  13   $15.00
115892218   20181109REF7                  13   $16.00
115892226   20181109REF8                  13   $17.00
115892234   20181109REF9                  13   $18.00
115892242   20181109REF10                 13   $19.10
ID     1223                                         <<-Trailer rec                                             


If I am splitting the file with 5 records in each file, file contain records as below
File-1
Code:

115892150   20181109REF1                  13   $10.00
115892168   20181109REF2                  13   $11.00
115892176   20181109REF3                  13   $12.00
ID     0111                                      <<-Trailer rec
115892184   20181109REF4                  13   $13.00


File-2
Code:

115892192   20181109REF5                  13   $14.00
ID     0012                                      <<-Trailer rec                        
115892200   20181109REF6                  13   $15.00
115892218   20181109REF7                  13   $16.00
115892226   20181109REF8                  13   $17.00


File-3
Code:

115892234   20181109REF9                  13   $18.00
115892242   20181109REF10                 13   $19.10
ID     1223                                         <<-Trailer rec                                             


Here the trailer record of a corresponding detail records is not in same file. I am flexible with number of records in each file, But I need trailer rec in same file.

Thanks a lot.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jan 23, 2019 12:49 pm
Reply with quote

If I remember correctly, you would need to read the DFSORT smart tricks document. I think what you want will be in there - it usually is in one guise or another

ftp.software.ibm.com/storage/dfsort/mvs/sorttrck.pdf

The article starting on page 46 will give some help in grouping records with trailers as it happens from the example.

Or maybe page 60 - 5 ways to split a dataset.

The document is must read for DFSORT hints, tips and solutions.

So ..... let us know what you have tried, showing us your code, and the results and I am sure that our sort wizards will help you on from there if you have any problems
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Jan 23, 2019 9:36 pm
Reply with quote

All you needed is to do a little Google or forum search before posting any questions.
This is the link I found which can be twisted slightly to achieve what you needed, try it.
www.ibmmainframeforum.com/dfsort-icetool-icegener/topic11217.html
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL/SORT to Split Records SYNCSORT 28
No new posts Synctool-dynamic split job for varyin... JCL & VSAM 7
No new posts To search DB2 table based on Conditio... DB2 1
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
Search our Forums:

Back to Top