View previous topic :: View next topic
|
Author |
Message |
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
are all duplicates from file B needed if there is a match with file B ?
Gerry |
|
Back to top |
|
|
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
yes all the duplicates are needed . |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You have duplicates on one file, so you'd not always see a direct relationship between paired on each file. |
|
Back to top |
|
|
chockalingam_rsp
New User
Joined: 13 Aug 2009 Posts: 43 Location: chennai
|
|
|
|
thanks a lot |
|
Back to top |
|
|
|