View previous topic :: View next topic |
Author |
Message |
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Thu Mar 27, 2014 10:39 pm Post subject: Comparsion of Two Input Files |
|
|
Hi All,
Could you please help me with below requirement.
Input:
I need to compare two input files. Both the Input files are in Packed decimal format and the Key for comparison is ENTIRE RECORD. We need compare with Packed decimal.
OutPut File should create as below:
1. Contains Unmatched records of both the Input Files.
2. Contains Unmatched records showing difference in particular record.
3. Contains records which are present in File1 but not in File2.
4. Contains records which are present in File2 but not in File1.
5. Contains Matched records of both files. |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Fri Mar 28, 2014 6:13 am Post subject: |
|
|
Hi Kolusu,
Can you help me in above requirement. |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Fri Mar 28, 2014 7:54 am Post subject: |
|
|
Both the input file length are 80 bytes.
Five output files should create for this comparision and files should create as below
1. Contains Unmatched records of both the Input Files.
2. Contains Unmatched records showing difference in particular record.
3. Contains records which are present in File1 but not in File2.
4. Contains records which are present in File2 but not in File1.
5. Contains Matched records of both files |
|
Back to top |
|
|
William Collins Supermod
Joined: 03 Jun 2012 Posts: 437 Topics: 0
|
Posted: Fri Mar 28, 2014 9:39 am Post subject: |
|
|
What is the difference between 1, and 3.&4.?
How do you feel 2. should possibly work? Unless you have a key other than the whole record, you can tell it doesn't match, but you can't tell what doesn't match.
So, for 1. (which seems to cover 3. and 4.) and 5, it is a simple JOINKEYS with JOIN UNPAIRED.
If you can clarify and explain more, it may be something else. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Mar 28, 2014 10:37 am Post subject: |
|
|
puttu wrote: | Hi Kolusu,
Can you help me in above requirement. |
Puttu,
Please be considerate to people's time. I don't work in the same time zone as you are and please don't expect me to help you round the clock. You posted the question during my night time and you wanted a response by sunrise?
Did you check the smart DFSORT trick "Create files with matching and non-matching records" ?
http://www.ibm.com/support/docview.wss?uid=isg3T7000094 _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Fri Mar 28, 2014 12:56 pm Post subject: |
|
|
Hi Williams,
1 -> Output File should Contains Unmatched records of both the Input Files that is File 1 and File 2.
3 -> Output File should Contains records which are present in Input File1 but not in Input File2.
4 -> Output File should Contains records which are present in Input File2 but not in Input File1.
Regarding output file 2 i am checking the requirement again. Will let you know.
Thanks a lot. |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Fri Mar 28, 2014 1:03 pm Post subject: |
|
|
Hi Kolusu,
I am sorry. |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Fri Mar 28, 2014 2:20 pm Post subject: |
|
|
puttu wrote: |
1 -> Output File should Contains Unmatched records of both the Input Files that is File 1 and File 2.
| Can someone explain how this is possible with only 2 input files? _________________ ....Terry |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Fri Mar 28, 2014 2:33 pm Post subject: |
|
|
Hi Terry,
As with Most questions like this one, the user should be required to post some sample representative data from all input files and the actual output wanted when this sample input is is processed . . .
d |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Sat Mar 29, 2014 5:34 am Post subject: |
|
|
Hi Terry,
1 -> Output File should Contains Unmatched records of both the Input Files that is File 1 and File 2.
To get above scenario output file. What I am doing is, After creating Output Files File 3 and File 4 then I am concetenating File 3 and File 4 to get Output File 1.
Below Output files for File 3 and File 4.
3 -> Output File should Contains records which are present in Input File1 but not in Input File2.
4 -> Output File should Contains records which are present in Input File2 but not in Input File1. |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Sat Mar 29, 2014 10:39 am Post subject: |
|
|
Why have you not posted some sample input/output data
di |
|
Back to top |
|
|
puttu Beginner
Joined: 29 Jul 2010 Posts: 41 Topics: 9
|
Posted: Sat Mar 29, 2014 1:07 pm Post subject: |
|
|
Will post you |
|
Back to top |
|
|
|
|