Now we need more information.
Is this a learning exercise, or a business requirement?
What are the LRECL and RECFM of the input and output files?
I'm thinking of RESIZE, but is your DFSORT level up-to-date?
Can you run this in a job and paste the sysout from the step here, so that we can tell?
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DUMMY
//SYSIN DD *
OPTION COPY
/*
Do you only have three records? Do you have groups of three records? Is this part of a larger task?