The paper may be the least of your problems.
You can only book a QF codeshare where there is an unbroken connection of QF codes to or from an international flight. So in practise, this means you can book QF codeshares following a QF arrival from AIS, or connecting to a US departure on QF to AUS. Anything else, and it is not bookable.
In your case, the JFK-SFO would need to be followed by SFO-xx_xx_-a QF international, all on QF codes (assuming that your ex NRT DONE4 travelled westwards, and you have arrived US East coast and then using you transcontinental before heading further westward to AUS).
AFF Supporters can remove this and all advertisements
In fact that is exactly what I am trying to do !!!!....Have JFK-SFO-MEL-BNE-MEL-NRT all on QF and yet when i talk to AA at the RTW desk in Dallas they cant see QF 3078 which is the code share flight JFK-SFO !!