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
 
index or pos or find not wroking second time in my system

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: index or pos or find not wroking second time in my system
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    Post subject: Re: index or pos or find not wroking second time in my syst
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    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 Comparing 2 Files using Current time arunsoods DFSORT/ICETOOL 7 Fri Sep 22, 2017 6:00 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts Confusion b/w index and subscript Deepak kumar25 Mainframe Interview Questions 7 Thu Aug 31, 2017 6:50 am
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am

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