INREC IFTHEN=(WHEN=INIT,OVERLAY=(351:SEQNUM,1,ZD)),
IFTHEN=(WHEN=GROUP,BEGIN=(351,1,CH,EQ,C'1'),
PUSH=(352:start1,length1,start2,length2)),RECORDS=3),
IFTHEN=(WHEN=GROUP,BEGIN=(351,1,CH,EQ,C'2'),
PUSH=(382:start3,length3,start4,length4)),RECORDS=2),
IFTHEN=(WHEN=(351,1,CH,EQ,C'3'),
BUILD=(352,lenght1,X,(352+length1),length2,X,
382,length3,X,(382+length3),length4,X,
start5,length5,X,start6,length6,350:X,351,1))
OUTFIL INCLUDE=(351,1,CH,EQ,C'3'),BUILD=(1,350)
Then you can add something like the above. fill in/calculate the starts and lengths.
The idea is to put a sequence number on your three remaining records, just for ease of identification.
To get data from one record to another, you have to use WHEN=GROUP and PUSH.
You will end up with two records with partial data which you now want to discard, so we do that with OUTFIL INCLUDE for the one we want.
Once working you can do some tidying for more efficient use of the space, but for so few records, it is hardly worth it. Just comment it to say why it wasn't done
Not tested, but you wanted it ASAP. You'll have to work a bit, at least.