On that so far, I think RESIZE will work well for you.
RESIZE from (400*35)+35 to 35, and have a USING(...)
In the ....CNTL file for the USING:
Use OMIT COND/INCLUDE COND to only get the records you want.
Use INREC to format the data so it has 35 bytes containing 'KEY=', the key, padded with blanks, then the 400 occurences.
RESIZE will then do its work and you'll get 401 records, some with blanks where there was no data in the occurence (unless all are used).
Use OUTFIL to OMIT= blank records, and produce the report, using WHEN=GROUP with BEGIN= (for the 'KEY=') to PUSH the key onto all the following records. Slightly tacky is what to do with that key record on the report. Either blank it out, or do it in two steps, with OMIT COND for those records in the second step. Or think of something neater