Requirement: The input file has 1 HD record, 1 DB record and multiple DT records. The output should only contain the group of records that has atleast one DT record. As we can see in the output, the second group did not have a DT record, so it shouldn't be in the output.
As usually, the question is not in SYNCSORT or whatever else, but: in the ability of developer to evaluate the logical algorithm - what is the sequence of operations for the task to be done, at all?
After the problem above is resolved, then the appropriate tool could be chosen.
Doesn't make any sense to do it vice versa.
If the data set is Not too big then, as a simple solution, you can read the data set in reverse using SEQ and use WHEN=GROUP where the Group BEGIN with 'DT' record and END with 'HD' record. At the end, reverse the order again to get your expected output.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Amar,
I don't have SYNCTOOL, but you could try something like this which does not involve SORTing. Assign group ID for each group and select groups having more than 2 records.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
sergeyken wrote:
Posts about ICETOOL under SYNCSORT, and vice versa, are prohibited by moderators (for unknown reason), isn't it?
That is not true. But posting solutions that are not compatible with the other product is not recommended and such posts could be edited/removed.
Syncsort has made 'ICETOOL' an alias to their product - 'SYNCTOOL'. So PGM=SYNCTOOL and PGM=ICETOOL can be used interchangeably at a typical Syncsort site unless there are any site specific restrictions.