Copy each file using CPYTOIMPF with pipe delimited to a work files — FILE1, FILE2, FILE3, FILE4
an RPG program would read first record from each and write to FILE5 in the order you want until eof
CL uses CPYF fromRec &wrkRec# toRec &wrkRec# add to member from FILE1 to FILE5
from FILE2 to FILE5
add 1 to &wrkRec# and continue copy until all records are copied.