//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN=...FB/54
//SORTJNF2 DD DSN=...FB/54
//SORTOUT DD DSN=OUTFILE.OUT,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(20,20),RLSE)
//SYSIN DD *
OPTION COPY
JOINKEYS FILE=F1,FIELDS=(1,21,A),SORTED,NOSEQCK
JOINKEYS FILE=F2,FIELDS=(1,21,A),SORTED,NOSEQCK
REFORMAT FIELDS=(F1:1,54,F2:50,5,?)
JOIN UNPAIRED,F1
OUTFIL IFTHEN=(WHEN=(60,1,CH,EQ,C'B'),OVERLAY=(50:55,5)),
IFOUTLEN=54