View previous topic :: View next topic |
Author |
Message |
js01 Beginner
Joined: 13 Oct 2005 Posts: 84 Topics: 32 Location: INDIA
|
Posted: Fri Jul 10, 2009 2:31 pm Post subject: Maching records using sort |
|
|
Hi,
i want a record that has same word in both files and remaning should be in other files , could you please help me on this
example:
INF1:
Code: |
AA SS YYYYYY12839
BA XS ZZZZZ14339
Q1 AS XXXXXX12839
|
INF2:
Code: |
12 WWASDSDASDYYYYYYY9898
YT ASADFFDXXXXXX232
TT ERERFT DERETTTTRER
|
OUTPUT SHOULD BE
OUT1: (MATCHING RECORDS)
Code: |
AA SS YYYYYY12839 ==> 'YYYYYY' MACTHED IN BOTH FILES
Q1 AS XXXXXX12839 ==> 'XXXXX' MACTHED IN BOTH
|
OUT2 : (NOT MACTHED FROM INF1)
OUT3 : (NOT MACTHED FROM INF2)
Code: |
TT ERERFT DERETTTTRER
|
|
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Jul 10, 2009 4:01 pm Post subject: |
|
|
js01,
Looks like the matching key both files is a variable field? ie it can occur anywhere in the record? Is that right?
Sort products do not have the capability of looking up and matching the key anywhere in the record. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
js01 Beginner
Joined: 13 Oct 2005 Posts: 84 Topics: 32 Location: INDIA
|
Posted: Mon Jul 13, 2009 8:52 am Post subject: |
|
|
Hi Kolusu,
Yes , you are right ..the matching key can anywhere in the rec , but record length is fixed its 100.
if not possible ,can you please provide a solution if the key at specific position like
1) infile1
AA SS YYYYYY12839
BA XS ZZZZZ14339
Q1 AS XXXXXX12839
2) infile2
12 YYYY9898
YT XXXX232
TT TTTTRER |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
js01 Beginner
Joined: 13 Oct 2005 Posts: 84 Topics: 32 Location: INDIA
|
Posted: Mon Jul 13, 2009 12:37 pm Post subject: |
|
|
thank you |
|
Back to top |
|
 |
|
|