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

SYNCSORT query...


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Thu Oct 29, 2009 11:23 am
Reply with quote

Hi,

I file (FB/200):
---------------
G111 A
G111 A
G222 A
G222 B
G222 C
G222 C
G333 A
G333 B
G444 A
G444 A
G555 A

II file (FB/250):
-----------------
G111 Z
G111 Y
G222 Z
G222 Z
G333 Z

MATCHED O/P FILE I M GETTING NOW:
--------------------------------
G111 A
G222 A
G222 B
G222 C
G333 A
G333 B

MISMATCHED O/P FILE I M GETTING NOW:
--------------------------
G444 A
G555 A

EXPECTED MATCHED O/P FILE:
--------------------------
G111 A
G111 A
G222 A
G222 B
G222 C
G222 C
G333 A
G333 B

EXPECTED MISMATCHED O/P FILE:
--------------------------
G444 A
G444 A
G555 A

Here both file 1 and file may have duplicate records. I want to compare file1 and file2 based on key (1,4) and want to create matched file1 and mismatched file1. Here i want the duplicates from FILE1.


SORT CARD I USED:
------------------------

Code:

  JOINKEYS FILES=F1,FIELDS=(1,4,A)               
  JOINKEYS FILES=F2,FIELDS=(1,4,A)               
  JOIN UNPAIRED                                 
  REFORMAT FIELDS=(F1:1,200,F2:1,4),FILL=X'FF'   
  SORT FIELDS=(1,200,CH,A)                       
  SUM FIELDS=NONE                               
  OUTFIL FNAMES=NOMATCH1,                       
         INCLUDE=(201,1,BI,EQ,X'FF'),           
         BUILD=(1,200)                           
  OUTFIL FNAMES=MATCH1,                     
         INCLUDE=(1,1,BI,NE,X'FF',AND,             
                  201,1,BI,NE,X'FF'),             
         BUILD=(1,200)                           


I want to achieve in single step using SYNCSORT JOINKEYS.

Please share ur thoughts,
Thanks in advance
R KARTHIK
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Oct 30, 2009 12:20 pm
Reply with quote

Hi,

Just a refresh...Will it possible to do in single step.

Kindly share ur thoughts.
Thanks
R KARTHIK
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
Search our Forums:

Back to Top