OK, first raise a fault for the program which processes two trailer records as though everything in the world is OK
The problem will be, when the trailer is read, a value is stored. When end of file is reached, the counts are compared.
What should happen is when the trailer is read, the counts are checked. Another READ. If not EOF (and irrelevant of content) there is a problem. This can be a in a loop to report any "post-trailer records".
You're going to need IFTHEN=(WHEN=GROUP with BEGIN= for the trailer value, and PUSH a SEQ.
when a file has data
On your existing OUTFIL you change your condition for NE and you add an OR which looks at the PUSHed SEQ (which only needs to be one byte) for NE space (C' '). Then, since you have SyncSORT, you hope you are sufficiently up-to-date such that when you look in the manual, you find the option, similar to NULLOUT, which gives a non-zero RC when a file has data