I am trying to code a Sort card to do the following.
My input file is:
I want to divide it into three groups
1. Fourth cahracter >= 1 and <3.
2. Fourth cahracter >= 3 and < 6
3. Fourth cahracter >=6
And then I want to take first(or any one, but only one) record of each group.
The input file has thousands of records and i want to copy these 3 reocrds to the output file(one single output file created using MOD in the SORTOUT).
Output file will look like
Is there any option which I can use to divide the input by Logical expressions and then access one record of every group.
I'm not sure if the GROUP function can be applied here.