View previous topic :: View next topic
|
Author |
Message |
rajantsr
New User
Joined: 31 Jan 2007 Posts: 21 Location: Chennai
|
|
|
|
Hi Frank ..
Here are the inputs
Code: |
File 1
-------
F1 F2
100 B
100 C
200 E
400 H
|
Code: |
File 2
--------
F1 F2F3 F4
100 A 1/1/2008 10
100 A 2/1/2008 20
100 A 3/1/2008 30
100 A 4/1/2008 40
100 A 5/1/2008 50
100 A 6/1/2008 60
200 D 1/1/2008 20
200 D 2/1/2008 40
200 D 3/1/2008 60
200 D 4/1/2008 80
200 D 5/1/2008 100
200 D 6/1/2008 120
300 F 1/1/2009 30
300 F 1/1/2008 60
300 F 2/1/2008 90
300 F 3/1/2008 120
300 F 4/1/2008 150
300 F 5/1/2008 180
300 F 6/1/2008 210
|
Code: |
Desired output
-----------------
F1 F2F3 F4
100 A 1/1/2008 10
100 A 2/1/2008 20
100 A 3/1/2008 30
100 A 4/1/2008 40
100 A 5/1/2008 50
100 A 6/1/2008 60
100 B 1/1/2008 10
100 B 2/1/2008 20
100 B 3/1/2008 30
100 B 4/1/2008 40
100 B 5/1/2008 50
100 B 6/1/2008 60
100 C 1/1/2008 10
100 C 2/1/2008 20
100 C 3/1/2008 30
100 C 4/1/2008 40
100 C 5/1/2008 50
100 C 6/1/2008 60
200 D 1/1/2008 20
200 D 2/1/2008 40
200 D 3/1/2008 60
200 D 4/1/2008 80
200 D 5/1/2008 100
200 D 6/1/2008 120
200 E 1/1/2008 20
200 E 2/1/2008 40
200 E 3/1/2008 60
200 E 4/1/2008 80
200 E 5/1/2008 100
200 E 6/1/2008 120
300 F 1/1/2008 60
300 F 2/1/2008 90
300 F 3/1/2008 120
300 F 4/1/2008 150
300 F 5/1/2008 180
300 F 6/1/2008 210
|
All files are flat files.
Is it possible to get a solution using Icetool for this.
Please help me out. Thanks for your help. |
|
Back to top |
|
|
rajantsr
New User
Joined: 31 Jan 2007 Posts: 21 Location: Chennai
|
|
|
|
All the files are FB 80. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Rajan,
Post few more details of your requirement. |
|
Back to top |
|
|
rajantsr
New User
Joined: 31 Jan 2007 Posts: 21 Location: Chennai
|
|
|
|
Details:
1) Both input files are flat file FB 80
2) Output file is also FB 80
3) Input file 1 and Input file 2 keys will be first 3 bytes(which is File1.F1 and File2.F1).
4) Both files will have duplicates in it.
5) For every record in file 1
For every match File1.F1 = File2.F1
Write a output record with File1.F1 File1.F2 File1.File2.F3 File2.F4
Next
Next
6) Write all File2 records in to output file
7) Sort the output file ascending Outfile.F1 Outfile.F2 |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
Back to top |
|
|
rajantsr
New User
Joined: 31 Jan 2007 Posts: 21 Location: Chennai
|
|
|
|
There can be any number of duplicates.. |
|
Back to top |
|
|
|