Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DFSORT/ICETOOL :: RE: SORTJOIN - Copy Matched and Unmatched to the same File

$
0
0
Author: Arun Raj
Posted: Tue Jan 17, 2017 7:11 pm (GMT 5.5)

Steve,

Will you have duplicate keys on 1,16 in either of your input data sets here : MINED.DATA.BASE/ORDER.TOTALS? If no, then the below might help.

If the field from ORDER.TOTALS has to be written to output only if you find a match in it, and if you like to retain the original data when no match is found you could do it with a JOIN UNPAIRED,F1 in your first step. Currently you do not have a JOIN statement that means - return only matching records. With JOIN UNPAIRED,F1 you get all the records from F1 plus F2 fields when a match is found.

And you might need an INREC IFTHEN to selectively OVERLAY the F2 field only when a match is found. To know whether a match is found, you might want to use the matchmarker ("?") in your REFORMAT that assumes values "1" - File1 Only, "2" - File2 Only OR 'B' - Both.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard


Viewing all articles
Browse latest Browse all 8500

Trending Articles