Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am
No new posts How to replace the below query? pkmurali DB2 12 Tue Feb 27, 2018 9:51 pm
No new posts Need Guidance regarding UPDATE query Poha Eater DB2 3 Mon Feb 12, 2018 11:35 pm
No new posts Query to skip Max time-stamp and fetc... vickey_dw DB2 8 Sun Jan 28, 2018 1:09 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us