OK, I've got more time, so here's my attempt:
I've done it just as a plain SORT with JOINKEYS. There is a presumption that both files are to be sorted in the join, but that is not relevant to the solution.
The idea is to "concatenate" a "999999999999" record to each input dataset (INA and INB).
If the main file for INB is empty, INB will only contain that 999999999999 record.
In this case, the only match you will get will be the 999999999999 record, so that is what will be on your output.
In the case of records on INB which match, the trick is then to avoid writing the 999999999999 record as it is not needed when there is data.
This is achieved by appending a sequence number to each record. This will never appear on the output file, because the IFOUTLEN=80 will cut it off as the records are written.
When the 999999999999 record is reached, the sequence number is tested. If not 00000001, the 999999999999 is "marked" for exclusion, I have in this example put an "O" (letter "O") in place of the final digit.
The unwanted 99999999999O record is then OMITted with OUTFIL.
//STEPEMPT EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS F1=INA,FIELDS=(1,12,A)
JOINKEYS F2=INB,FIELDS=(1,12,A)
REFORMAT FIELDS=(F1:1,80)
OPTION COPY
INREC IFOUTLEN=80,
IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,12,CH,EQ,C'999999999999',
AND,81,8,CH,NE,C'00000001'),
OVERLAY=(12:C'O'))
OUTFIL OMIT=(1,12,CH,EQ,C'99999999999O')
//INA DD *
111111111120 DATA
111111111111 DATA
111111111112 DATA
111111111113 DATA
111111111114 DATA
111111111115 DATA
111111111116 DATA
111111111117 DATA
111111111118 DATA
111111111119 DATA
999999999999
//INB DD *
999999999999
Output from the above,
Output with this for INB
111111111119 DATA
999999999999
I've used my own data and positions for testing, but you should be able to apply it to your requirement if necessary.