DFSORT help
Posted: Fri Aug 21, 2009 6:00 pm
First of all sorry if someone has asked this question
I have two files. The first file has a length of 173; the second file has a length of 37. I need obtain two files:
- output1 with the records that exist at input2
- output2 with the records that not exist at input2
input1 (173)
--------------
00000001xxxx001xxxxxxxxxx
00000002xxxx006xxxxxxxxxx
00000002xxxx007xxxxxxxxxx
00000004xxxx001xxxxxxxxxx
00000005xxxx003xxxxxxxxxx
00000007xxxx003xxxxxxxxxx
00000007xxxx009xxxxxxxxxx
00000007xxxx012xxxxxxxxxx
00000008xxxx009xxxxxxxxxx
00000008xxxx013xxxxxxxxxx
00000010xxxx003xxxxxxxxxx
........
input2 (37)
-------------
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx008
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx004
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx008
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000006xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000006xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000006xxxxxxxxxxxxxxxxxxxxxxxxxx005
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx004
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx007
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx007
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx007
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx011
00000009xxxxxxxxxxxxxxxxxxxxxxxxxx003
.......
the field with 'x' is not relevant for comparation.
output1 (37) (the same records)
-------------------------------------
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
output2 (137) (distint records)
------------------------------------
00000002xxxx007xxxxxxxxxx (the record not exist at input2)
00000008xxxx013xxxxxxxxxx (the record not exist at input2)
As you see I compare the positions 1-8, 13, 14, 15 of input1 with the positions 1-8, 35, 36, 37 of input2. This is positions
are the keys of both files.
I need compare the first 1-8 position and If it's are the same, compare the other position (13, 14, 15 input1; 35, 36, 37 input2)
Thank you
I have two files. The first file has a length of 173; the second file has a length of 37. I need obtain two files:
- output1 with the records that exist at input2
- output2 with the records that not exist at input2
input1 (173)
--------------
00000001xxxx001xxxxxxxxxx
00000002xxxx006xxxxxxxxxx
00000002xxxx007xxxxxxxxxx
00000004xxxx001xxxxxxxxxx
00000005xxxx003xxxxxxxxxx
00000007xxxx003xxxxxxxxxx
00000007xxxx009xxxxxxxxxx
00000007xxxx012xxxxxxxxxx
00000008xxxx009xxxxxxxxxx
00000008xxxx013xxxxxxxxxx
00000010xxxx003xxxxxxxxxx
........
input2 (37)
-------------
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx008
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx004
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx008
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000006xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000006xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000006xxxxxxxxxxxxxxxxxxxxxxxxxx005
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx002
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx004
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx007
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx007
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx007
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx011
00000009xxxxxxxxxxxxxxxxxxxxxxxxxx003
.......
the field with 'x' is not relevant for comparation.
output1 (37) (the same records)
-------------------------------------
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000001xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000002xxxxxxxxxxxxxxxxxxxxxxxxxx006
00000004xxxxxxxxxxxxxxxxxxxxxxxxxx001
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000005xxxxxxxxxxxxxxxxxxxxxxxxxx003
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
00000008xxxxxxxxxxxxxxxxxxxxxxxxxx009
output2 (137) (distint records)
------------------------------------
00000002xxxx007xxxxxxxxxx (the record not exist at input2)
00000008xxxx013xxxxxxxxxx (the record not exist at input2)
As you see I compare the positions 1-8, 13, 14, 15 of input1 with the positions 1-8, 35, 36, 37 of input2. This is positions
are the keys of both files.
I need compare the first 1-8 position and If it's are the same, compare the other position (13, 14, 15 input1; 35, 36, 37 input2)
Thank you