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

Need to find a word in a line


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Raje1002

New User


Joined: 21 Feb 2009
Posts: 11
Location: India

PostPosted: Thu Jan 27, 2011 11:44 am
Reply with quote

Hi all,

I want to see whether the word "COPY" is present in a line or not.

Currently I have a line which will tells if the "COPY" is present in the 3rd word of that line.

"IF WORD(CBLLINE,3) ¬= 'COPY' THEN ITERATE"

I want to perform a task if the word "COPY" is present in that line.

How to achecive this?
Back to top
View user's profile Send private message
Guest







PostPosted: Thu Jan 27, 2011 11:59 am
Reply with quote

Hi Raje1002,
The following can be used to find the presence of copy:

Code:


if Pos('copy',cblline) = 0 then
say 'no copy found'



devil13
There is always a better solution.
Back to top
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Jan 27, 2011 2:14 pm
Reply with quote

I would go for WORDPOS...

O.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top