Join keys usage for matched/unmatched



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Join keys usage for matched/unmatched

Postby misterlodari » Tue Dec 04, 2012 5:50 pm

Hi,

I am trying to match two files IP1 and IP2 and write the matched records in a file OP1 and the records which are there in IP1 and does not have match in IP2 to OP2,and the records which are there in IP2 and does not have match in IP1 to OP3.

I found the example sort card which is shown below from a material released by IBM

//JKE5 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD *                         
CARRIE    F101                           
DAVID     F102                           
FRANK     F103                           
HOLLY     F104                           
VICKY     F105                           
//SORTJNF2 DD *                         
NO    CARRIE    F201                     
YES   HOLLY     F202                     
YES   KAREN     F203                     
NO    SRI HARI  F204                     
YES   VICKY     F205                     
//F1ONLY DD SYSOUT=*
//F2ONLY DD SYSOUT=*
//BOTH DD SYSOUT=*
//SYSIN DD *
* Control statements for JOINKEYS application
JOINKEYS FILE=F1,FIELDS=(1,10,A),SORTED,NOSEQCK
JOINKEYS FILE=F2,FIELDS=(7,10,A),SORTED,NOSEQCK
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:1,14,F2:1,20,?)
* Control statements for main task (joined records)
OPTION COPY
OUTFIL FNAMES=F1ONLY,INCLUDE=(35,1,CH,EQ,C'1'),
BUILD=(1,14)
OUTFIL FNAMES=F2ONLY,INCLUDE=(35,1,CH,EQ,C'2'),
BUILD=(15,20)
OUTFIL FNAMES=BOTH,INCLUDE=(35,1,CH,EQ,C'B'),BUILD=(1,14,/,15,20)
/*


When I executed this, I am getting the below error message

SYSIN :                                               
   JOINKEYS FILE=F1,FIELDS=(1,10,A),SORTED,NOSEQCK   
   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> *           

   JOINKEYS FILE=F2,FIELDS=(7,10,A),SORTED,NOSEQCK   
   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> *           
   JOIN UNPAIRED,F1,F2                               
   REFORMAT FIELDS=(F1:1,14,F2:1,20,?)               
   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*                 
   OPTION COPY                                       
   OUTFIL FNAMES=F1ONLY,INCLUDE=(35,1,CH,EQ,C'1'),   
   BUILD=(1,14)                                       
   OUTFIL FNAMES=F2ONLY,INCLUDE=(35,1,CH,EQ,C'2'),   
   BUILD=(15,20)                                     
   OUTFIL FNAMES=BOTH,INCLUDE=(35,1,CH,EQ,C'B'),     
   BUILD=(1,14,/,15,20)                               
 WER268A  JOINKEYS STATEMENT: SYNTAX ERROR           
 WER268A  JOINKEYS STATEMENT: SYNTAX ERROR           
 WER268A  REFORMAT STATEMENT: SYNTAX ERROR           
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE

Please clarify on this topic

Code'd and rainbow-colours and odd formatting removed
misterlodari
 
Posts: 1
Joined: Tue Dec 04, 2012 3:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Join keys usage for matched/unmatched

Postby BillyBoyo » Tue Dec 04, 2012 6:47 pm

Please use the Code tags to preserve spacing. Do not make your posting unattractive and easy to ignore with weird colours and styles.

Your three syntax errors (note how you didn't get the syntax error marker to line up) are for DFSORT syntax which is not supported in SyncSort. Remove ",NOSEQCK" (twice) and the "?" in the REFORMAT record.

Look at the many JOINKEYS examples in the SyncSort forum for how to identify whether or not a match has occured and therefore which data exists on the REFORMAT record.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Join keys usage for matched/unmatched

Postby dick scherrer » Tue Dec 04, 2012 9:45 pm

Hello and welcome to the forum,

I found the example sort card which is shown below from a material released by IBM
Which would have been good if you were using the IBM sort (DFSORT).

As Bill mentioned, you need to look thru the Syncsort documentation and examples in the Syncsort part of our forum. Much of the IBM syntax will work with Syncsort - some does not. Best to stick with Syncsort manuals and examples until you become quite familiar with the product.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post