Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us