For your first file, in JNF1CNTL, append a "1". This is just to ensure that a key with a constant value is available for the whole file. It is not "relevant" because no matches will occur. You tell the JOINKEYS that this is SORTED.
For your second file, which you will allow JOINKEYS to sort for you, INCLUDE the TOTAL-1 and TOTAL-2 records. Use SUM with a set-up value of '1' to tell the range of the ID for the TOTAL-2 records later (which is why we include TOTAL-1 in the SUM). The "key" is set-up with a value of '0', to arrive before all the '1's of the data.
In the JOIN, ONLY have unmatched records (no matches will be possible, but cleaner to be specific).
In the main-task have an additional GROUP for the unmatched record from file 2, which is our SUMmed total. PUSH this so that it is available on all the records.
The first OUTFIL remains as was shown earlier.
The second OUTFIL has an AND added, so that the full range of IDs can be included for the variable number of TOTAL-2 groups.
The third OUTFIL specifies SAVE, so that anything not written to the first or second OUTFIL will end up here.
//JNF1CNTL DD *
//JNF2CNTL DD *