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

index or pos or find not wroking second time in my system


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

New User


Joined: 21 Aug 2004
Posts: 4
Location: pune

PostPosted: Mon Jun 19, 2006 5:28 pm
Reply with quote

Hi all
i am writing a tool for reporting in rexx.
i used index or find or pos commands twice.
first time they worked fine but second time they didnot work.
can any body tell em what is the problem?
is we need any type of initialization before using them twice.
thanks in advance

sudershan Kumar
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Mon Jun 19, 2006 8:10 pm
Reply with quote

There is no initialization needed to execute POS, INDEX, or FIND.

POS and INDEX work the same except the commands are opposite.

X = POS('XYZ', 'BCDEFXYZ') - looking for XYZ in BCDEFXYZ
The value of X should be 6

X=INDEX('BCDEFGXYZ','XYZ') - looking for XYZ in BCDEFGXYZ
The value of X should also be 7

FIND finds words within a sentence.

X=FIND('A LOOK OUT THE WINDOW', 'WINDOW')
WINDOW is the 5th word of the phrase, so X will equal 5.

After you create a REXX statement (like any of the 3 above), you can enter SAY X on the next line. When you run the REXX, it will tell you the value it is coming up with so you can compare what REXX is finding against what you know is to be true.

You can also use TRACE "I" in your REXX and step through the REXX commands every time you press enter. TRACE OFF will turn the trace back off.
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 Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts C Compile time time stamps Java & MQSeries 10
Search our Forums:

Back to Top