View previous topic :: View next topic
|
Author |
Message |
BHARTI SINDHWANI
New User
Joined: 23 Jul 2021 Posts: 2 Location: INDIA
|
|
|
|
I need to know if there is any COBOL function for below requirement , Need to perform partial match FILE A field with the File B field. Below are the scenarios
FILEA FILEB
FIELDA FIELD B
Code: |
Sunny Industrial Sunny PTE. LTD - match , found
ABC Bank ABC Bank Holland - match, found
Denamrk Denmark@123 - match, found
ABC LTD. ABC - not match
ABC LTD ABCLTD - not match |
I need to find if field A is present in the FIELD B.
Coded |
|
Back to top |
|
|
BHARTI SINDHWANI
New User
Joined: 23 Jul 2021 Posts: 2 Location: INDIA
|
|
|
|
Mentioning the fields again for the file A & File B
Code: |
FILEA
FIELDA
1)Sunny
2)ABC Bank
3)Denmark
4)ABC LTD.
5)ABC LTD |
Code: |
FILEB
FIELD B
1)Industrial Sunny PTE. LTD
2)ABC Bank Holland
3)Denmark@123
4)ABC
5)ABCLTD |
|
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
Welcome!
It’s easier to do it in DFSORT why write program? Besides have you heard of INSPECT in COBOL ?
ibmmainframes.com/about47707.html
Next time please use SEARCH function to see if you find similar post to your problem and try yourself first and second use code tags when representing code or data. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Depending upon the size of the records and the number of records to be compared, this could be an expensive implementation. It can be achieved by using reference modification since COBOL does not have an INDEX function for string comparisons. |
|
Back to top |
|
|
|