I have created two sumfiles and am now trying to create a report containing information combining the two. They are keyed and there are matched and unmatched records. I am currently getting ouput that is giving me only the unmatched records. I would like to get both matched and unmatched. Please see my programming below. Any help is appreciated.
IF NOT MATCHED
IF SFILE
BOTH:CITY = SFILE:EXTR-OUT-CITY-NAME
BOTH
RAW = SFILE:STALLY
PUT BOTH
ELSE
BOTH:CITY = HD2:SUB-CITY-NAME
BOTH
RAW = HD2:STALLY2
PUT BOTH
END-IF
IF MATCHED
BOTH:CITY = HD2:SUB-CITY-NAME
BOTH
RAW = SFILE:STALLY + HD2:STALLY2
PUT BOTH
END-IF
PRINT REP3
END-IF
IF NOT MATCHED
IF SFILE
BOTH:CITY = SFILE:EXTR-OUT-CITY-NAME
BOTH
PUT BOTH
ELSE
BOTH:CITY = HD2:SUB-CITY-NAME
BOTH
PUT BOTH
END-IF
IF MATCHED
BOTH:CITY = HD2:SUB-CITY-NAME
BOTH
PUT BOTH
END-IF
PRINT REP3
END-IF