Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Searching string in a sentence contains words ,special char

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Rajeshwari.b

New User


Joined: 23 Feb 2006
Posts: 2
Location: India

PostPosted: Sun Jun 24, 2007 6:42 pm    Post subject: Searching string in a sentence contains words ,special char
Reply with quote

Hi ,

I want to know can we use Search command to search string in a sentence contains words ,special chars etc.

ex: I need to search string '36 Arakas' [/color]
in the below line of strings(Address)
' 36 Arakashan Road,
Opposite New Delhi Railway Station
Pin code-5902761'
[/color]

Is any other way can we do this other than Search?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Jun 24, 2007 7:21 pm    Post subject:
Reply with quote

Hello,

You can do what you want using reference modification.

To do what you want, you will have to determine the length of the argument and then set up a loop to compare the argument against the string starting at the first position and advancing thru the string modifying the starting position of the compare until you have parsed the string.

You will also need to determine whether upper/lower case is to be considered. I'd suggest converting everything to upper case before comparing if case is not to be considered.
Back to top
View user's profile Send private message
Rajeshwari.b

New User


Joined: 23 Feb 2006
Posts: 2
Location: India

PostPosted: Sun Jun 24, 2007 7:46 pm    Post subject:
Reply with quote

thanks!!!

I will try this....
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Jun 24, 2007 10:55 pm    Post subject:
Reply with quote

You're welcome and good luck icon_smile.gif

If you have questions as you proceed, we're here.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us