IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Searching string in a sentence contains words ,special char


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Sun Jun 24, 2007 7:21 pm
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
Reply with quote

thanks!!!

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

Moderator Emeritus


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

PostPosted: Sun Jun 24, 2007 10:55 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
Search our Forums:

Back to Top