MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FIND with 'OR' condition - TSO Edit

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Tue Feb 23, 2010 7:37 pm    Post subject: FIND with 'OR' condition - TSO Edit Reply with quote

Without writing a macro, is there a 'built in' way to do
a find specifying multiple values ?

For example, I want to find the values 'A' or 'C' below :

Code:
    H2501T4.TOMC.JOBLIB9(ED)
 ===>                       
****************************
A                           
B                           
C                           
D                           
E                           
F                           
****************************
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Tue Feb 23, 2010 10:12 pm    Post subject: Reply with quote

As far as I know, not with a single command but "f a all;f c all" should do it.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Wed Feb 24, 2010 4:04 pm    Post subject: Reply with quote

Quote:
but "f a all;f c all" should do it
This will find the "C". Even if the first value is not found, nothing is shown for the first command.
_________________
All the best,

di
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Wed Feb 24, 2010 8:22 pm    Post subject: Reply with quote

It will also find any As, if there ARE any. I don't understand what you're saying.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Thu Feb 25, 2010 8:17 am    Post subject: Reply with quote

I believe that he means that even if there ARE any 'A' lines, that the subsequent, concatenated FIND C ALL will turn off highlighting on any 'A' lines that were found with the first of the concatenated commands, and only the 'C' lines will be highlighted.
Perhaps you meant to or assumed that all lines had been excluded (X ALL) before issuing the FIND commands? If so, then all found 'A' lines and 'C' lines will be visible, and all other lines will remain excluded.
_________________
A computer once beat me at chess, but it was no match for me at kick boxing.
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Thu Feb 25, 2010 3:43 pm    Post subject: Reply with quote

Quote:
I believe that he means that even if there ARE any 'A' lines, that the subsequent, concatenated FIND C ALL will turn off highlighting on any 'A' lines that were found with the first of the concatenated commands, and only the 'C' lines will be highlighted.
He meant that. . . Smile
_________________
All the best,

di
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Thu Feb 25, 2010 8:49 pm    Post subject: Reply with quote

Yes, I should have had an "x all" before the 2 find commands. And, as RonB says, finding all the Cs will NOT hide the As that were previously found.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Tue Mar 16, 2010 7:58 pm    Post subject: Reply with quote

Well, bottom line is that your suggestion works:

Thanks!

Code:
    H2501T4.TOMC.JOBLIB9(AS
 ===> x all;f a all;f c all
***************************
A                         
B                         
C                         
A                         
D                         
E                         
C                         
F                         
G                         
A                         


    H2501T4.TOMC.JOBLIB9(AS
 ===>                     
***************************
A                         
-  -  -  -  -  -  -  -  - 
C                         
A                         
-  -  -  -  -  -  -  -  - 
C                         
-  -  -  -  -  -  -  -  - 
A                         
***************************
Back to top
View user's profile Send private message
Grant
Beginner


Joined: 02 Dec 2002
Posts: 45
Topics: 1
Location: Sydney, NSW, Australia

PostPosted: Tue Mar 16, 2010 9:07 pm    Post subject: Reply with quote

or create your own, let's call it FX

ISREDIT MACRO (PARM1 PARM2) NOPROCESS
ISREDIT EXCLUDE ALL
IF &LASTCC = 0 THEN
ISREDIT FIND &PARM1 ALL
ISREDIT FIND &PARM2 ALL
EXIT CODE(&MAXCC)


type: FX 'A' 'C' (will exclude all lines and then find all occurrences of A and/or C)
Back to top
View user's profile Send private message
tcurrier
Intermediate


Joined: 10 Feb 2006
Posts: 188
Topics: 68

PostPosted: Tue Mar 16, 2010 9:31 pm    Post subject: Reply with quote

Thanks... neat idea... I'm getting the following error, though :

Code:
    H2501T4.TOMC.JOBLIB9(
 ===> fx 'a' 'c'         
*************************
a                       
b                       
c                       
d                       
e                       



Code:
********************************************************************
*                                                                   
* Command in error . : MACRO PARM1 PARM2 NOPROCESS                 
*                                                                   
* Invalid macro command                                             
* Parameter found outside parentheses and is not PROCESS/NOPROCESS.
*                                                                   
*   Error message ID . : ISRE747                                   
*                                                                   
*   Last return code . : 12                                         
*                                                                   
*   Macro executing  . : FX                                         
*                                                                   
* Press ENTER key to terminate the macro.                           
*                                                                   
*                                                                   
*                                                                   
********************************************************************
Back to top
View user's profile Send private message
Grant
Beginner


Joined: 02 Dec 2002
Posts: 45
Topics: 1
Location: Sydney, NSW, Australia

PostPosted: Tue Mar 16, 2010 10:34 pm    Post subject: Reply with quote

might need to put (PARM1 PARM2) in brackets
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group