View previous topic :: View next topic
|
Author |
Message |
hernikiten
New User
Joined: 08 Apr 2005 Posts: 23 Location: india
|
|
|
|
Hi,
I have One file
Code: |
Pos 1-3 pos 20-23 pos 35-39
Employee id Employee Key Employee data
123 ABCD DATA1
345 ABCD DATA1
433 ABCD DATA5
456 EFGH DATA2
678 HIJK DATA2
890 JKLM DATA3
123 LMNO DATA4
345 IJKL DATA4
|
I have to create 3 files from this file in such a way
File 1 --> same as master file but with all (duplicate employee key and employee data).
Code: |
Employee id Employee Key Employee data
123 ABCD DATA1
345 ABCD DATA1
|
File 2 --> same as master file but with Unique and First record of duplicate Employee data.(FIRSTDUP)
Code: |
Employee id Employee Key Employee data
433 ABCD DATA5
456 EFGH DATA2
890 JKLM DATA3
123 LMNOP DATA4
|
File 3 --> all remaining records.
Code: |
678 HIJK DATA2
345 IJKL DATA4
|
Note --> File 1 2 & 3 should be mutualy exclusive i.e no record should be copied twice.
Thanks |
|
Back to top |
|
|
hernikiten
New User
Joined: 08 Apr 2005 Posts: 23 Location: india
|
|
|
|
One correction -> File2 would be using FIRST option instead of FIRSTDUP |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT/ICETOOL job that I think will do what you want. But it will have the output records in sorted order by employee data and employee key as follows:
OUT1
Code: |
123 ABCD DATA1
345 ABCD DATA1
|
OUT2
Code: |
456 EFGH DATA2
890 JKLM DATA3
345 IJKL DATA4
433 ABCD DATA5
|
OUT3
Code: |
678 HIJK DATA2
123 LMNO DATA4
|
Will that do? |
|
Back to top |
|
|
hernikiten
New User
Joined: 08 Apr 2005 Posts: 23 Location: india
|
|
|
|
Hi,
Even better if the data would be sorted.
Cheers. |
|
Back to top |
|
|
|