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 11:05 pm (GMT 5.5)

Yes, you should retain the original value in REFORMAT and then in the INREC IFTHEN, evaluate if it is a matched record, and then OVERLAY the data from F2. So only for matched records the field will get overwritten. For non-matching records, the field will remain unchanged.

This is untested, but it would look something like this:
Code:
  JOINKEYS FILES=F1,FIELDS=(1,16,A)                       
  JOINKEYS FILES=F2,FIELDS=(1,16,A)                       
  REFORMAT FIELDS=(F1:1,267,F2:22,5,?)                     
  SORT FIELDS=COPY                                         
  INREC IFOUTLEN=267,                                     
        IFTHEN=(WHEN=(273,1,CH,EQ,C'B'),OVERLAY=(52:268,5))

_________________
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