I have a task that sounds incredibly simple but I cannot get to work. I have 2 input files, FB, LRECL 80. They both have a composite key (1,8,A,17,9,A).
I have to merge these two files into a single output. In the event of a duplicate keys then only the input from file 2 should be written to output.
This card outputs the duplicates from file 2, but not the unmatched records. Any help or advice would be greatly appreciated
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,8,A,17,9,A)
JOINKEYS FILE=F2,FIELDS=(1,8,A,17,9,A)
JOIN UNPAIRED,F2
REFORMAT FIELDS=(F2:1,80)
SORT FIELDS=COPY
/*
JOINKEYS FILE=F1,FIELDS=(1,8,A,17,9,A)
JOINKEYS FILE=F2,FIELDS=(1,8,A,17,9,A)
JOIN UNPAIRED,F2
REFORMAT FIELDS=(F2:1,80)
SORT FIELDS=COPY
/*
Thanks
Coded for you - please do it yourself next time