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
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm


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