View previous topic :: View next topic
|
Author |
Message |
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Please find below my requirement
The format of my input record is as follows
Code: |
FORMAT OF INPUT RECORD
01 input-rec
05 INP-CENTRE PIC X(06)
05 INP-XTN PIC X(10)
05 INP-YTN PIC X(10)
05 INP-GRP PIC X(19)
05 INP-FILLER PIC X(35) VALUE SPACES. |
Code: |
Input1:
centre|---XTN---|----YTN---|---- GRP --------|
2624332622433613 1111111111111111111
2624332622433620 1111111111111111111
262433 26224361001111111111111111111
262433 26224361051111111111111111111
2624332622436825 44444444
2624332622433625 222222
2624332622433626 222222
2624332622433627 222222
2624332622433628 222222
262433 2622436101222222
262433 2622436102222222
2624332622433613 11-0
2624332622433620 11-0
2624332622433621 11-0
262433 262243650011-0
262433 262243650111-0
2624332622433625 333333
2624332622433627 333333
262433 2622436510333333
262433 2622436520333333 |
The requirement is to remove the duplicate entry of a XTN under a different Group (GRP).
If a duplicate XTN is found then,the duplicate record should be written in Output file 2(same format as input)
But if all the XTNs under a GRP are found to be duplicates then all the GRP’s records(including records
that have XTN as spaces but having values in YTN)should go to a different output file(output file 3) .
These duplicate records should not be written in Output file 2.
Unique records should also written in Output file 1
Output1: Unique records
Code: |
2624332622433613 1111111111111111111
2624332622433620 1111111111111111111
262433 26224361001111111111111111111
262433 26224361051111111111111111111
2624332622436825 44444444
2624332622433625 222222
2624332622433626 222222
2624332622433627 222222
2624332622433628 222222
262433 2622436101222222
262433 2622436102222222
2624332622433621 11-0
262433 262243650011-0
262433 262243650111-0 |
Output2 : Partial Duplicate
Code: |
2624332622433613 11-0
2624332622433620 11-0 |
Output3 : Full Duplicate
Code: |
2624332622433625 333333
2624332622433627 333333
262433 2622436510333333
262433 2622436520333333
|
Can ICETOOL be used for this reqt? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
are the requirements clear? am i not clear in explaining the requirements ? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Aaru wrote: |
are the requirements clear? am i not clear in explaining the requirements ? |
Please remember that differnet folks are in different timezones. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Your rules about the relationship between the groups and duplicate XTN numbers is not very clear. Are XTNs for one group duplicates if those XTNs are found in another group, or in any group, or what?
Also, I can't figure out what the rules are for blank XTN fields. Can you explain why some of them end up in output file1 and some end up in output file3 but none end up in output file2? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Thanks Frank for your reply. yes, it is a bit confusing.
I had used the SELECT and the SPLICE operator of ICETOOL and it worked. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I'm glad to hear you figured out a solution yourself. |
|
Back to top |
|
|
|