socker_dad
Active User

Joined: 05 Dec 2006 Posts: 171 Location: Seattle, WA
|
|
|
|
OK, I RTFM, and looked at a few examples, but I'm not getting correct output. I want to see the keys from File 1 that are not on File 2. Here's what I have:
Code: |
IN1 DD DSN=RWAR107.TEST.SORTPERS,DISP=SHR
IN2 DD DSN=RWAR107.TEST.SORTDEPD,DISP=SHR
*
SORTOUT DD DSN=SEB107.TEST.OUT12,
//SYSIN DD *
JOINKEYS F1=IN1,FIELDS=(1,9,A),SORTED
JOINKEYS F2=IN2,FIELDS=(2,9,A),SORTED
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:1,9)
OPTION COPY
OUTREC BUILD=(1,9)
END
//* |
What I'm getting is a list of all keys in F2.
What am I doing wrong? |
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
I want to see the keys from File 1 that are not on File 2 |
Code: |
JOIN UNPAIRED,F1,ONLY |
is what you need.
Code: |
JOIN UNPAIRED,F1,F2 |
would give both matching and non-matching keys from both the inputs. |
|