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

flow of find command in the macro


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maridawson

New User


Joined: 24 Jun 2008
Posts: 59
Location: chennai

PostPosted: Thu Jan 29, 2009 5:04 pm
Reply with quote

I'm coding a macro to find a specific occurence of a string using find command. Thing is , the string I have to search is some lines above the current cursor position. so I set the cursor position to the first line of the macro and gave a find command to search the string. It is giving a RC '4' , however after the execution of the macro ..... the string that I used to find is highlighted. i dont understand. please help.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Jan 29, 2009 5:17 pm
Reply with quote

Try MacroSpy. It might be useful in such situation.

O.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Jan 29, 2009 9:46 pm
Reply with quote

Show us your macro.
Back to top
View user's profile Send private message
maridawson

New User


Joined: 24 Jun 2008
Posts: 59
Location: chennai

PostPosted: Fri Jan 30, 2009 10:34 am
Reply with quote

pgm:
string3 string1
string2

macro:
find string1 first
instructions
find string2 next
instructions
find string3 next
instructions.

I am getting a rc of 4 at the third find command. Also i like to know whether it is possible to give 2 different labels for a same line?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Jan 30, 2009 10:05 pm
Reply with quote

FIND NEXT starts from the current cursor location. Your previous FIND commands have moved the cursor beyond the text you are now looking for.

I suggest using FIND ALL to find it anywhere. OR use two successive FIND instructions. The first may take you to the end of the file and the second will wrap from the top. Or set the cursor to the first list before doing each FIND.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Jan 31, 2009 2:43 am
Reply with quote

Or FIND FIRST ???
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
Search our Forums:

Back to Top