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 HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am

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