You can try the following JCL. OFILE will contain the desired o/p. This JCL is very similar to the one posted by Frank, except that I have used OUTFIL along with INCLUDE and OUTREC instead ...
The following JCL will give you the desired results. INFILE is the i/p file with data vertically grouped and OUTFILE is the o/p file with data horizontally grouped. I have assumed that ...