Posted: Fri Sep 16, 2005 3:52 am Post subject: SPLICE:one file contails duplicates and requires all rec's
HI,
I could find the post which suits for my requirement before posting.
I have 2 files FILEA and FILEB.
1)FILEA can have duplicates,FILEB is not having any duplicates.
2)FILEA can contains records which are not matched in FILEB and vice versa.
I want all the matched records from FILEA and also all unmatched records from FILEA.
I don't want unmatched records from FILEB.so OUTPUT file record count should be equal to the FILEA record count
This is what i have done
1. I use file B as Base file and file A as overlay file as i have multiple file A records for certain records of file B.
2. Arrange the records from file to have the keys in the same columns. Also append a character to eliminate excess file B records.
3. SPLICE the records ON the Key with WITHALL to create multiple records with KEEPNODUPS to keep excess file A records.
But the SPLICE removes duplicates even from file A. i.e. if i have no record in file B for a key and 10 records in file A then it keeps the last 9 records of file A (due to KEEPNODUPS)
but i still lose one record. If i dont specify this, it will keep only one record.
Is there a way in which i can preserve all the duplicates of file A.
I used below SPLICE stsmt:
SPLICE FROM(BIWCMR) TO(AFFLOUT1) ON(144,7,CH) WITHALL WITH(1,143) -
WITH(218,694) KEEPNODUPS USING(AFCM)
I am getting very few less records which i am expecting.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Sep 22, 2005 6:39 pm Post subject:
Guttu,
Kolusu said:
Quote:
If the above links does not solve your problem, then you need to provide us the follwing details.
1. Lrecl and recfm of both files
2. Position and format of the fields to be treated as keys
3. sample input and desired output
You said:
Quote:
Can you please let me know,whr i am doing mistake.
Kolusu asked for that information so we can help you. If you don't supply it, then you can't expect us to help. We can't read your mind or look over your shoulder at your input or output records.
Specifically, we don't know what your input looks like or what you want the output to look like.
I also don't know what you mean by:
Quote:
as u said i have seen and fallowd,but i am not getting the exact num out put recordas what i wanted..i.e output rec's and CMRIN rec's num shud match.
Show us what you're getting and explain how it differs from what you want. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum