Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 2 Thu Jan 19, 2017 1:31 am
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us