In JNF1CNTL using INREC with WHEN=GROUP for the DOC to PUSH an ID to an extension of the record.
In JNF2CNTL use INCLUDE to get only the DOC records. Use INREC to put a sequence number in an extension to the record (same length as the ID you PUSHed in the other). Then subtract two from the sequence number.
A REFORMAT statement with the entire F1 record and the match marker.
In the main task, INCLUDE for (match marker equal to B AND extension equal to 1 or 2), OR match marker equal to 1 (unmatched records).