IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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: 177
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: 177
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Sort with JOINKEYS using two VB files DFSORT/ICETOOL 1
No new posts JOINKEYS, how to keep all occurrences? DFSORT/ICETOOL 2
Search our Forums:

Back to Top