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

Joining files with intermittent headers and trailers


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Floramq

New User


Joined: 18 May 2017
Posts: 5
Location: CAnada

PostPosted: Sat Oct 10, 2026 4:34 am
Reply with quote

Would anyone be able to solve this ? I have two input files like this but much bigger. One has 0000 and 9999 as headers and trailers, but multiple chunks like this:
0000
DATA A
DATA C
DATA E
9999
0000
DATA G
DATA Q
9999
The other has no header/trailer and it might have
DATA B and more fields
DATA E and more fields
DATA Q and more fields

The output I want is
0000
DATA E with the more fields
9999
0000
DATA G with the more fields
DATA Q with the more fields
9999
I am not fussy about the 0000 and 9999, except the final output batches cannot be more than 999 records themselves. So the following would be fine as long as no more than 999 detail records in each batch.
0000
DATA E with the more fields
DATA G with the more fields
DATA Q with the more fields
9999

I am really struggling with this. The output file will be much smaller than the input two files, but there certainly could be more than 999 matches.
Thank you for any help !
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1448
Location: Bamberg, Germany

PostPosted: Sat Oct 10, 2026 10:05 am
Reply with quote

Please explain the logic to join. First part seems to be an inner join, second matches only Q but has also G included.

Use code tags when presenting data/code icon_exclaim.gif
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts INPFIL FILES, FNAMES examples SYNCSORT 7
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts JCL to merge two files side by side DFSORT/ICETOOL 3
No new posts Create a specific record/file based o... SYNCSORT 8
No new posts 3 files concatenated to 1 DFSORT/ICETOOL 2
Search our Forums:


Back to Top