View previous topic :: View next topic |
Author |
Message |
tcurrier Intermediate
Joined: 10 Feb 2006 Posts: 188 Topics: 68
|
Posted: Tue Feb 23, 2010 7:37 pm Post subject: FIND with 'OR' condition - TSO Edit |
|
|
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 |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Tue Feb 23, 2010 10:12 pm Post subject: |
|
|
As far as I know, not with a single command but "f a all;f c all" should do it. _________________ ....Terry |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Wed Feb 24, 2010 4:04 pm Post subject: |
|
|
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 |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Wed Feb 24, 2010 8:22 pm Post subject: |
|
|
It will also find any As, if there ARE any. I don't understand what you're saying. _________________ ....Terry |
|
Back to top |
|
|
RonB Beginner
Joined: 02 Dec 2002 Posts: 93 Topics: 0 Location: Orlando, FL
|
Posted: Thu Feb 25, 2010 8:17 am Post subject: |
|
|
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 |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Thu Feb 25, 2010 3:43 pm Post subject: |
|
|
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. . . _________________ All the best,
di |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Thu Feb 25, 2010 8:49 pm Post subject: |
|
|
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 |
|
|
tcurrier Intermediate
Joined: 10 Feb 2006 Posts: 188 Topics: 68
|
Posted: Tue Mar 16, 2010 7:58 pm Post subject: |
|
|
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 |
|
|
Grant Beginner
Joined: 02 Dec 2002 Posts: 45 Topics: 1 Location: Sydney, NSW, Australia
|
Posted: Tue Mar 16, 2010 9:07 pm Post subject: |
|
|
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 |
|
|
tcurrier Intermediate
Joined: 10 Feb 2006 Posts: 188 Topics: 68
|
Posted: Tue Mar 16, 2010 9:31 pm Post subject: |
|
|
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 |
|
|
Grant Beginner
Joined: 02 Dec 2002 Posts: 45 Topics: 1 Location: Sydney, NSW, Australia
|
Posted: Tue Mar 16, 2010 10:34 pm Post subject: |
|
|
might need to put (PARM1 PARM2) in brackets |
|
Back to top |
|
|
|
|