very sorry to bother you again and again!!!
we can understand the RESTART command given in INREC.
But what is the purpose of RESTART = (1,3) in the OUTREC? what it exactly does in the above code? It is only bit confusing for us.

I think you mistook the requirement. It is not just getting the FIRST record based on the first 3 bytes as key.
Actually we are almost done with the output but we couldn't understand the part of the code
OUTREC OVERLAY=(81:SEQNUM,8,ZD,RESTART=(1,3))
That too especially RESTART command in the above code.

The expected output should be as follows:
1111111111111XXXX1 04/24/2009
1111111111111XXXX1 04/25/2009(since this also occurs the maximum)
1111111111111XXXX1 04/24/2010(since this also occurs the maximum)
2222222222222XXXX2 04/01/2010
2222222222222XXXX3 04/01/2010

Yes we need all the matching maximum records for the given input. In the below input for the given key 1111111111111XXXX1 the maximum occurrance records are 04/24/2009 , 04/25/2009 and 04/24/2010. similarly for the other keys also. Hope your clear with the requirement now.