You can use JOINKEYS with the same DSN for the two input files. In JNF2CNTL, use INCLUDE to only get the headers and use SUM with a dummy count so that you get one record with a count of the number of duplicates.
In JNF1CNTL, use WHEN=GROUP to PUSH the header onto all records for that group, with an ID.
Do the JOINKEYS on the header/summed-value and header/ID. Only write out matches (don't use a JOIN statement, so that you only get matches by default).