For this use Worker.dat file.
To change the nonprimary work relation to primary you have to set PrimaryFlag attribute as Y along with DateForPrimaryFlagChange attribute. This is will make your non primary work relation to primary and primary work relation automatically marked as non primary.
Below is the sample HDL template to change the primary work relation flag.
Scenario -
METADATA|WorkRelationship|LegalEmployerName|DateStart|PersonNumber|ActualTerminationDate|NotifiedTerminationDate|LastWorkingDate|WorkerNumber|WorkerType|PrimaryFlag|DateForPrimaryFlagChange
MERGE|WorkRelationship|US Legal Entity|2015/10/26|XXTEST1|||||XXTEST1|E|Y|2015/10/26
After Upload -