Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYNCSORT query...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SYNCSORT query...
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    Post subject: Reply to: SYNCSORT query...
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us