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

Syncsort for 2 files


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

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Nov 02, 2011 11:45 am
Reply with quote

Hi ,


I have 2 files (FB) , FILE A (1161 record Length) has No Duplicate values and FILE B ( 181 record Lenght) has duplicates. The keys are from postion 2 - 10 for both the files. I need to compare both the files using syncsort and write the whole record of FILE B in the output file. Nothing is needed from FILE A.


Can you please help me in this.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Nov 02, 2011 11:58 am
Reply with quote

Hi,

are all duplicates from file B needed if there is a match with file B ?

Gerry
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Nov 02, 2011 11:59 am
Reply with quote

yes all the duplicates are needed .
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Nov 02, 2011 12:09 pm
Reply with quote

Hi,

try this
Code:
//STEP1  EXEC PGM=SORT                             
//SYSOUT   DD SYSOUT=*                             
//SORTJNF1 DD DSN=filea                           
//SORTJNF2 DD DSN=fileb                           
//SORTOUT  DD SYSOUT=*                             
//SYSIN    DD *                                   
  JOINKEYS FILE=F1,FIELDS=(2,9,A)                 
  JOINKEYS FILE=F2,FIELDS=(2,9,A)                 
  REFORMAT FIELDS=(F2:1,181)                       
  SORT FIELDS=COPY                                 
/*


Gerry
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Nov 02, 2011 1:48 pm
Reply with quote

hi the job ran fine ,

can you please explain me the following statistics

JNF1 STATISTICS
SORTJNF1 : RECFM=FB ; LRECL= 1161; BLKSIZE= 27864
SORTJNF1 : RCD IN= 1000,OMITTED= 0,PAIRED= 752,UNPAIRED= 248
FILESIZE 1,161,000 BYTES
JNF2 STATISTICS
SORTJNF2 : RECFM=FB ; LRECL= 181; BLKSIZE= 27874
SORTJNF2 : RCD IN= 1000,OMITTED= 0,PAIRED= 885,UNPAIRED= 115
FILESIZE 181,000 BYTES


especially the PARIED parameter . Coz i not able to understand the difference in the JNF1 and JNF2 values
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Nov 02, 2011 1:53 pm
Reply with quote

You have duplicates on one file, so you'd not always see a direct relationship between paired on each file.
Back to top
View user's profile Send private message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Wed Nov 02, 2011 1:54 pm
Reply with quote

thanks a lot icon_smile.gif
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 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top