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
 
REXX find command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
priti

New User


Joined: 29 Sep 2005
Posts: 3

PostPosted: Fri Feb 10, 2006 6:51 pm    Post subject: REXX find command
Reply with quote

I wanted to know the syntax of find command in REXX. Pls give an example too.

Also can you pls find out the error in the following rex code

"FIND "'PROCEDURE DIVISION'" WORD FIRST"
"(PDROW,PDCOL) = CURSOR"
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Feb 10, 2006 7:13 pm    Post subject: Re: REXX find command
Reply with quote

Why is it so difficult for folks to look this stuff up for themselves? It's described right here.

Quote:

FIND is a non-SAA built-in function provided only by TSO/E and VM.

WORDPOS is the preferred built-in function for this type of word search.

FIND(string,phrase)

returns the word number of the first word of phrase found in string or returns 0 if phrase is not found or if there are no words in phrase. The phrase is a sequence of blank-delimited words. Multiple blanks between words in phrase or string are treated as a single blank for the comparison.

Here are some examples:

FIND('now is the time','is the time') -> 2
FIND('now is the time','is the') -> 2
FIND('now is the time','is time ') -> 0


Quote:
Also can you pls find out the error in the following rex code

"FIND "'PROCEDURE DIVISION'" WORD FIRST"
"(PDROW,PDCOL) = CURSOR"

That is not REXX code (REXX code would not coded within quotes). It looks more like an ISPF EDIT 'FIND' command, possibly even part of an ISPF EDIT Macro. If it is, you can look here.
Back to top
View user's profile Send private message
priti

New User


Joined: 29 Sep 2005
Posts: 3

PostPosted: Fri Feb 10, 2006 7:25 pm    Post subject: Re: REXX find command
Reply with quote

Well I saw this explanation in the IBM manual, but the rexx code I have is not using the same format.
AS I mentioned earlier,
can u find out the error in the following rexx code
"FIND "'PROCEDURE DIVISION'" WORD FIRST"
"(PDROW,PDCOL) = CURSOR"
Back to top
View user's profile Send private message
mainfrae
Currently Banned

New User


Joined: 07 Feb 2006
Posts: 4

PostPosted: Fri Feb 10, 2006 7:28 pm    Post subject: Re: REXX find command
Reply with quote

HI PRITA
change the code by giving "FIND 'PROCEDURE DIVISION' FIRST" or
"FIND 'PROCEDURE DIVISION' WORD FIRST".it is working fine for me.
U can use SEEK command also.SEEK means search,but there is difference between SEEK and FIND

COL8=8
"SEEK "COL8" 'PROCEDURE DIVISION' FIRST"

COL8 is a variable which represents the 8th column

If u need more information,please let me know
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm

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