Kurfuerst63,
By sentences , do you mean records in the file? if so you can use DFSORT's joinkeys feature to compare the 2 files and get the unmatched records like shown below . I assumed your input files to be RECFM=FB and LRECL=80
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//INA DD *
AAA I AM PRESENT IN BOTH SO DROP ME
BBB NOT IN FILE 2 , SO NEED TO PICK ME FROM F1
CCC I AM PRESENT IN BOTH SO DROP ME
DDD I AM PRESENT IN BOTH SO DROP ME
EEE NOT IN FILE 2 , SO NEED TO PICK ME FROM F1
//INB DD *
AAA MATCH RECORD
CCC MATCH RECORD
DDD MATCH RECORD
FFF NOT IN FILE 1 , SO NEED TO PICK ME FROM F2
GGG NOT IN FILE 1 , SO NEED TO PICK ME FROM F2
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
JOINKEYS F1=INA,FIELDS=(1,3,A)
JOINKEYS F2=INB,FIELDS=(1,3,A)
JOIN UNPAIRED
REFORMAT FIELDS=(F1:1,80,?,F2:1,80)
OUTFIL OMIT=(81,1,CH,EQ,C'B'),IFOUTLEN=80,
IFTHEN=(WHEN=(81,1,CH,EQ,C'2'),BUILD=(82,80))
//*
The output of this is
BBB NOT IN FILE 2 , SO NEED TO PICK ME FROM F1
EEE NOT IN FILE 2 , SO NEED TO PICK ME FROM F1
FFF NOT IN FILE 1 , SO NEED TO PICK ME FROM F2
GGG NOT IN FILE 1 , SO NEED TO PICK ME FROM F2
Check this link for detailed explanation of joinkeys with examples
http://publibz.boulder.ibm.com/cgi-bin/ ... F=ICE1SH60