View previous topic :: View next topic
|
Author |
Message |
Pavankumar.m Warnings : 1 New User
Joined: 28 Nov 2010 Posts: 53 Location: Mumbai
|
|
|
|
hi,
Can any one please suggest me how to search a mutiple strings in single go in a record.
Ex:my records has below data(in sequential file)
hello how are you, doing good
where are you from ,I am from banglore
Rerquirement:-Need to verify whether the strings 'are' 'from' present in above records. here i need scan each record for these two strings. The string position may change for each record.
Can any one please suggest me best and simply to solve this.
I tried using substring, perform loop but the processing is not efficient, becuase i have around 15 strings to search at a time in each record.
Thanks and Regards,
Pavan Kumar.M |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
You might need to do seperate INSPECT TALLYING for each string record by record
or if the sole purpose of the requirement is to search for strings and copy , you could think of DFSORT unless it is a NOT must do in COBOL only. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Can you show what you have tried?
Do you just need to know the sub-strings are "there" or do you need to know where they are, as in start-position?
Are the sub-strings fixed, or "dynamic"?
Why are you concerned about efficiency, is your volume of data large? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If your goal is to parse multiple strings (15) from a large data file, be prepared for High resource consumption. |
|
Back to top |
|
|
|