IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

New JOINKEYS Head Scratcher


 
IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: :: View next topic  
Author Message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 171
Location: Seattle, WA

PostPosted: Wed Nov 21, 2018 1:19 am
Reply with quote

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?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Nov 21, 2018 1:32 am
Reply with quote

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.
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 171
Location: Seattle, WA

PostPosted: Wed Nov 21, 2018 1:46 am
Reply with quote

Thanks Arun - that did the trick!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Compare two character variables Head ... CLIST & REXX 3
No new posts Joinkeys overlay and unmatched with O... DFSORT/ICETOOL 11
No new posts Reformat clause in joinkeys sortcard ... DFSORT/ICETOOL 2
No new posts JOINKEYS Paired and Unpaired Sort on ... DFSORT/ICETOOL 7
No new posts Weirdo results with JOINKEYS DFSORT/ICETOOL 4

Back to Top