d7 or D7 both are same. Let me put my requirement again
Group the first two record, a record has 2 from input file in order. First record starts as Y and the
The second one starts with C.
Key is in middle of two records. Consider If the first has AA and the second has BB. Then the key for the group is AABB.similarly we need to group all the records and the final out put is the unique combination of keys and its associated records for the first occurance.
In my example we have 56d7 and 56D7 both key are identical . I need any one of its associated record, if it is 56d7 output is 1st group I.e 1st and 2nd record. If it is 56D7 the output should have only 5th and 6 th record . I need any one of 56d7 combination. Hope this clarifies. Consider rec length as 80