I am using the above code successfully to get the common matched OVERLAYED records at the output file.
However, my requirement is to OVERLAY the common matched records in the output file while write the unmatched records from SORTJNF2 file at the output as is.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Add JOIN UNPAIRED,F2
Your IFTHEN will be false (the F1 data will all be blanks).
Your INCLUDE COND= is redundant in your code (you only get Bs) and is unnecessary also for getting Bs and 2s, as you'll only get given those from the above JOIN.
You can "cut down" the REFORMAT record with IFOUTLEN=834, so when the IFTHEN processing is finished, the records will be treated as 834 bytes.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Ksouren007,
You don't really need to sort the whole File 1 as you are only interested in just the key and 46th byte (validating byte 880 after reformat), so just build those 2 fields.
Also as rule of thumb always code your duplicate file as SORTJNF1 and unique file as SORTJNF2.