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 reg query on DYNALLOC feature raghuraman123 SYNCSORT 12 Wed Jan 10, 2018 2:42 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 4 Tue Nov 07, 2017 8:34 pm

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