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 based on Trailer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
pshongal

New User


Joined: 14 Jun 2012
Posts: 95
Location: India

PostPosted: Wed Jan 23, 2019 11:50 am    Post subject: SPLIT based on Trailer
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: 8763
Location: Welsh Wales

PostPosted: Wed Jan 23, 2019 12:49 pm    Post subject:
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://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

Senior Member


Joined: 21 Sep 2010
Posts: 2104
Location: NY,USA

PostPosted: Wed Jan 23, 2019 9:36 pm    Post subject:
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.
http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy members from Input PDS to Output... Poha Eater JCL & VSAM 9 Tue Jan 29, 2019 3:56 pm
No new posts calculate the record count and based ... naveensrimf DFSORT/ICETOOL 1 Tue Jan 08, 2019 11:20 pm
No new posts Process Last Key of a record based on... naveen katkuri DFSORT/ICETOOL 5 Mon Nov 12, 2018 9:54 am
No new posts Merge two files and sum up the count ... preeti6 JCL & VSAM 6 Thu Sep 06, 2018 10:57 am
No new posts Concatenaing multiple rows to single ... Vignesh Sid DFSORT/ICETOOL 1 Tue Aug 14, 2018 8:59 am

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