try this code
//S1A EXEC PGM=SORT
//$ORTPARM DD DSN=IMS.PARMLIB(IMSMS005),DISP=SHR
//SORTJNF1 DD *
0912345678900000100
1012345678900000200
0912123278900000300
//SORTJNF2 DD *
0912345678900000100
0212125678900000200
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
REFORMAT FIELDS=(F1:1,19,F2:1,19)
JOIN UNPAIRED,F1,F2
SORT FIELDS=(1,10,CH,A)
INCLUDE COND=(1,10,CH,NE,20,10,CH)
OUTREC IFTHEN=(WHEN=(1,1,CH,EQ,C' ',&,20,1,CH,NE,C' '),
BUILD=(1:20,19)),
IFTHEN=(WHEN=(1,1,CH,NE,C' ',&,20,1,CH,EQ,C' '),
BUILD=(1:1,19))
Thanks
-3nadh