Think about this using the MapReduce mentality. Let's assume the each program is writing output without reading the other's output. I would write two separate files, and then have a 'reduce' phase. Your reduction might be a simple chronologically ordered merge.
If, however, your programs' require one-anothers' output. You have a very different problem and need to rethink how you are partitioning the work.
Finally, if the two programs' outputs are similar but independent, and you are writing it into one file so a third program can read it all, consider changing the third program to read both files.