Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 96
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: 8784
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: 2271
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 Dynamically split large DSN list into... Ghellar CLIST & REXX 14 Tue Sep 17, 2019 8:24 pm
No new posts Need to fetch data from database base... Satandale COBOL Programming 8 Sun Sep 08, 2019 12:01 am
No new posts Header and trailer for a PS file kumara kanthirava JCL & VSAM 5 Mon Aug 19, 2019 3:54 pm
No new posts Select based on a range from a differ... sergeyken SYNCSORT 2 Fri Aug 16, 2019 12:37 am
This topic is locked: you cannot edit posts or make replies. Select based on a range from a differ... vamsimul SYNCSORT 13 Tue Aug 13, 2019 12:36 pm

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